Closed
Description
In ggplot2 3.1.1
the area under the curve handles negative values
library(ggplot2)
set.seed(115)
ggplot(
data.frame(
x = 1:100,
y = cumsum(rnorm(n = 100, mean = 0, sd = 3))
),
aes(x, y)) +
geom_area(fill = "pink", alpha = 0.5) +
geom_path()
In ggplot2 3.2.0
something goes wrong:
library(ggplot2)
set.seed(115)
ggplot(
data.frame(
x = 1:100,
y = cumsum(rnorm(n = 100, mean = 0, sd = 3))
),
aes(x, y)) +
geom_area(fill = "pink", alpha = 0.5) +
geom_path()