-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Horizontal bar graphs: Match default stack order in legend as well #1837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@thomasp85 we forgot about this important case. Any ideas? |
Honestly I don't think we can have it both ways, so we need to decide on the preferred default. |
We could add a |
Would reversing legend order work? It doesn't seem great to have labels "b", "a". And reversing the mapping between colour and letter would just flip the colours in both locations. |
Come to think of it the natural thing would be to have a switch in |
Agreed. Let me merge my stacking changes, and then one of us can add a |
@thomasp85 I also changed the default order to stack from inside-out (i.e. from close to axis to far away). That looks better to me eye because you get a mirror image if each |
I'm unsure what you mean - skimming the diff it seems default behaviour is preserved (I.e. Stacking from top to bottom) |
Negative values stack in the opposite direction now |
`position = position_stack(reverse = TRUE)` is needed otherwise the error bars are plotted at wrong locations. See <tidyverse/ggplot2#1837>
Uh oh!
There was an error while loading. Please reload this page.
According to the v2.2.0 announcement: "position_stack() and position_fill() now stack values in the reverse order of the grouping, which makes the default stack order match the legend." IMHO this should also be true for horizontal bar graphs.
position = "stack_point"
borrowed from #1821.The text was updated successfully, but these errors were encountered: