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
different widths in bar plot when using undropped factor levels #5211
I found a potential problem with the widths of bars using geom_bar when using factor levels, and keeping unused levels with drop = F argument in scale_x_discrete. This can be overcome by setting the width in aesthetic but thought the variable nature of widths in plotting might be an issue.
This is indeed unfortunate. Given that resolution(), which determines the default width, makes a special case for integers; should it also use that case for the "mapped_discrete" class? See:
Activity
teunbrand commentedon Feb 28, 2023
This is indeed unfortunate. Given that
resolution(), which determines the default width, makes a special case for integers; should it also use that case for the"mapped_discrete"class? See:ggplot2/R/utilities-resolution.r
Lines 21 to 22 in 5141ef5
thomasp85 commentedon Mar 13, 2023
Yes, I think that is sensible