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
The new preserve parameter of position_dodge is awesome (#1935, I think), but when applied to stat_count or stat_boxplot (maybe more), with missing levels that aren't the final one, it shifts groups to the left to fill the empty level:
While that behavior makes sense given that these stats previously didn't care about empty groups didn't need drawing or spacing, I suspect most users would expect bars to keep their group position à la geom_col/stat_identity (which has 0s to keep things in place):
I encountered this "feature" and I think it is hard to fix. At the instant when the dodging is done, the group information is insufficient. I think you would have to change/add another a group/sub-group that can be used by the position aesthetics. That would be a significant change to the underlying data model that has been constant and sufficient for a very long time.
May be there is another way, I may look at it again.
The new
preserve
parameter ofposition_dodge
is awesome (#1935, I think), but when applied tostat_count
orstat_boxplot
(maybe more), with missing levels that aren't the final one, it shifts groups to the left to fill the empty level:While that behavior makes sense given that these stats previously didn't care about empty groups didn't need drawing or spacing, I suspect most users would expect bars to keep their group position à la
geom_col
/stat_identity
(which has 0s to keep things in place):Is this desired behavior or a bug?
The text was updated successfully, but these errors were encountered: