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
It sort of makes weird sense as the order at each x-value follows the order it occurs in in the data. I would suggest we add a sorting step to position_stack - In this way we can also get the stacking order to follow the legend order...
@hadley thoughts? It might change the appearance of some plots, though I would argue that the benefit of the bug fix and sorting would alleviate that...
It would not be bulletproof, i.e. it is only possible to match the stacking to the default legend order and not to any modified order defined in scale_*, that is, we can sort only by the data itself as position doesn't have access to the scale object...
Activity
thomasp85 commentedon Aug 2, 2016
It sort of makes weird sense as the order at each x-value follows the order it occurs in in the data. I would suggest we add a sorting step to
position_stack- In this way we can also get the stacking order to follow the legend order...@hadley thoughts? It might change the appearance of some plots, though I would argue that the benefit of the bug fix and sorting would alleviate that...
hadley commentedon Aug 2, 2016
I like the idea of matching the stacking order to the legend order. That would also help with #1593
thomasp85 commentedon Aug 3, 2016
It would not be bulletproof, i.e. it is only possible to match the stacking to the default legend order and not to any modified order defined in scale_*, that is, we can sort only by the data itself as position doesn't have access to the scale object...
hadley commentedon Aug 3, 2016
Oh that's true - and it would mean that to change the stacking order you'd be forced to change the levels of a factor. Hmmm.
thomasp85 commentedon Aug 3, 2016
I think this is reasonable. If well documented it is not too much to ask that they reorder factor levels to achieve their desired stacking...