-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG df.plot.box handles matplotlib Axes with sharey=True #54940
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
Conversation
sharey
with horizontal plot.box
I think this is a first fix. However, there is still a discrepancy between
|
def _remove_labels_from_axis(axis: Axis) -> None: | |
for t in axis.get_majorticklabels(): | |
t.set_visible(False) | |
# set_visible will not be effective if | |
# minor axis has NullLocator and NullFormatter (default) | |
if isinstance(axis.get_minor_locator(), ticker.NullLocator): | |
axis.set_minor_locator(ticker.AutoLocator()) | |
if isinstance(axis.get_minor_formatter(), ticker.NullFormatter): | |
axis.set_minor_formatter(ticker.FormatStrFormatter("")) | |
for t in axis.get_minorticklabels(): | |
t.set_visible(False) | |
axis.get_label().set_visible(False) |
The plt.boxplot
will not create the minor ticks but with the plot accessor, the _adorn_subplots
is calling handle_shared_axes
that is calling the function above and somehow recreating the minor ticks.
I would leave this issue for another PR because touching this part should have some other side effect on other plots.
Thanks @glemaitre |
…54940) * BUG manage sharey in plot.box with vert=False * fix * add entry in whats new * iter
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.