-
Notifications
You must be signed in to change notification settings - Fork 633
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
Improper alignment of boxplots in facets #697
Comments
I am experiencing the same / similar problem with facet_wrap. If I plot a single facet, the plot looks great
However, if I have several facets, the boxes become so thin they are imperceptible
|
These are some different issues going on here:
Chalking this up as further evidence for #706 (comment) |
I'm a little late to the game, but maybe this will help someone. I had a similar issue to @LukasHebing (single box per row/x-point) and found that using the parameter I'm still not 100% sure why this happens, but I strongly suspect it's an implicit assumption about the data structure combination with color/facet_col/facet_row/x. Example solutionGiven the following data sample I would get the following results with the boxmode not specified: # Plot figure (misaligned)
px.box(
data,
x='col',
y='value',
facet_row='row',
color='group',
# boxmode='overlay',
width=500, height=300
) And with the boxmode set to # Plot figure (aligned)
px.box(
data,
x='col',
y='value',
facet_row='row',
color='group',
boxmode='overlay',
width=500, height=300
) However, if you have >1 box per category, this would cause the boxes to overlap (which is precisely what you set with that boxmode). Instead, using |
Hi,
first of all, thanks for a great package!
I have spent some time with it recently and I think that I have found a bug. If I use boxplots and facets, the boxplots in the upper facet are on the left side of the category while the boxplots in the bottom facet are on the right side of the category, while I believe that they should be aligned in the middle. Picture tells more than thousands words, so see bellow...
you can get it with the following code:
The text was updated successfully, but these errors were encountered: