You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
geom_area position_stack order appears to have changed #2778
Compare the above with the relevant part of the manual:
# Stacking is also useful for time series
series <- data.frame(
time = c(rep(1, 4),rep(2, 4), rep(3, 4), rep(4, 4)),
type = rep(c('a', 'b', 'c', 'd'), 4),
value = rpois(16, 10)
)
ggplot(series, aes(time, value)) +
geom_area(aes(fill = type))
@karawoo, You're probably right. My plots are from February 2015, so this may well be an old change.
The example from the manual confused me because I got a plot that looked quite different and assumed it was a common cause. The real reason is that the data used in the example is random. It might be useful to set a seed before the data is created to make it clearer, e.g.
set.seed(1)
series <- data.frame(
time = c(rep(1, 4),rep(2, 4), rep(3, 4), rep(4, 4)),
type = rep(c('a', 'b', 'c', 'd'), 4),
value = rpois(16, 10)
)
ggplot(series, aes(time, value)) +
geom_area(aes(fill = type))
Activity
ptoche commentedon Jul 30, 2018
An example from plots I made a couple of years ago.
Before:
After:
karawoo commentedon Jul 30, 2018
It looks the same in the manual to me?
I do think the stack order changed at some point but it was a while ago in 2.2.0.
ptoche commentedon Aug 1, 2018
@karawoo, You're probably right. My plots are from February 2015, so this may well be an old change.
The example from the manual confused me because I got a plot that looked quite different and assumed it was a common cause. The real reason is that the data used in the example is random. It might be useful to set a seed before the data is created to make it clearer, e.g.
lock commentedon Jan 28, 2019
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/