-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Don't use ImageGrid in demo_text_rotation_mode. #15281
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
share_all=True, aspect=True, cbar_mode=None) | ||
axs = np.empty((len(va_list), len(ha_list)), object) | ||
gs = subplot_location.subgridspec(*axs.shape) | ||
axs[0, 0] = fig.add_subplot(gs[0, 0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this part would be slightly easier with something like #14421 available.
I don't like that the orange boxes now touch the vertical spines. In general the old example was very good (it got improved a lot not too long ago already). If it is more complicated to not use |
I don't mind waiting for the discussion on #14421 to be resolved first. |
57b65fb
to
3bcaed4
Compare
What's the motivation for the change? I don't see that either one is particularly be better than the other. |
I think gridspecs are nicer to use -- even though ImageGrid does allow for more accurate positioning, you need to use mpl_toolkits-specific APIs for e.g. labels and ticks (https://github.com/matplotlib/matplotlib/pull/15281/files#diff-90eb9024490f32de5d0796d7456283f0L35, https://github.com/matplotlib/matplotlib/pull/15281/files#diff-90eb9024490f32de5d0796d7456283f0L51) which is a bit awkward. |
I agree w/ @anntzer. I think, when possible, we should make examples use the core library, not things from |
If you rebase, please ping me for a review. I think we should change this. |
The example can be written without involving axes_grid.
3bcaed4
to
f57a3c2
Compare
rebased |
Not a prerequisite for merging, but would "compressed-layout" #20016 help with the spacing? |
possibly? |
The example can be written without involving axes_grid.
old: https://matplotlib.org/gallery/text_labels_and_annotations/demo_text_rotation_mode.html#sphx-glr-gallery-text-labels-and-annotations-demo-text-rotation-mode-py

new:
(admittedly the inability to set the absolute spacing between subplots is mildly annoying)
PR Summary
PR Checklist