-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Boxplot resets x-axis limits and ticks #2921
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
Comments
Does this also happen on master? |
You are misunderstanding how ticks/tick labels behave. When you use I have made a PR to add a flag to make box_plot managing the xticks optional. |
Ok. I agree that 99% of the time the x-ticks should fall under the boxes. I am also ok with boxplot grabbing the first two strings in the tick label list, rather than the two labels that previously corresponded to x =1 and x = 2. Thanks for making xtick management optional. What about the x-axis limits? In my opinion, boxplot should not adjust user specified axis limits. |
The call to |
Closes matplotlib#2921 - added test for managa_xtick option to boxplot - added CHANGELOG and whats_new.rst entry for manage_xticks
Boxplot appears to reset the x-axis limits and ticks. For example, the following code
produces this plot

But when I execute this code next
the plot changes to

Three things changed:
The obvious work around is to set these parameters after you have called
axes.boxplot()
. However, reseting the axes is not consistent withaxes.plot()
,axes.bar()
,axes.imshow()
, or any other plotting method I have used. Other methods respect the user specified x limits and tick marks. This behavior also is not consistent with the y-axis behavior in boxplot. Boxplot respected the user specified y limits and tick marks.I am working with Matplotlib 1.3.0.
The text was updated successfully, but these errors were encountered: