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
This bug was discovered as a part of fixing #2281 and initially discussed there. I am breaking this out into a separate issue.
In geom_boxplot() and associated geoms, width is typically a computed variable - not one often specified by the user. But in the original issue the poster specified width = 1 in their reprex, and as I was playing around fixing the resulting bug with scales::expand_range(), I noticed strange behaviour if width is ever set above 1. Specifically, when plotting multiple boxplots, it seems to no longer specify the width of each individual boxplot but instead the width of all plotted boxplots, resulting in axis ticks that don't line up.
Any thoughts on where this is coming from would be most appreciated. If I get time in the next couple weeks, I'll dig into this more.
Any width value greater than 1 except 8 (the number of groups) will return a plot with misaligned labels.
Perhaps this is the expected behaviour of width and it's just acting unexpectedly for values ≤ 1 ? Or this is just a scales issue where we need to make sure our break points respect width alignment? Or maybe we shouldn't allow width specification at all?
The text was updated successfully, but these errors were encountered:
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/
lockbot
locked and limited conversation to collaborators
Jan 27, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This bug was discovered as a part of fixing #2281 and initially discussed there. I am breaking this out into a separate issue.
In
geom_boxplot()
and associated geoms,width
is typically a computed variable - not one often specified by the user. But in the original issue the poster specifiedwidth = 1
in their reprex, and as I was playing around fixing the resulting bug withscales::expand_range()
, I noticed strange behaviour ifwidth
is ever set above 1. Specifically, when plotting multiple boxplots, it seems to no longer specify the width of each individual boxplot but instead the width of all plotted boxplots, resulting in axis ticks that don't line up.Any thoughts on where this is coming from would be most appreciated. If I get time in the next couple weeks, I'll dig into this more.
Walk through reprex:
Default behavior, computed
width
, expected result:width
set to 1. Individual boxplots get wider, each with a width of 1 now:width
> 1, entire plot shrinks, axis ticks do not line up. All of the boxplots now fit within the designatedwidth
of 1.1.Any
width
value greater than 1 except 8 (the number of groups) will return a plot with misaligned labels.Perhaps this is the expected behaviour of
width
and it's just acting unexpectedly for values ≤ 1 ? Or this is just a scales issue where we need to make sure our break points respect width alignment? Or maybe we shouldn't allowwidth
specification at all?The text was updated successfully, but these errors were encountered: