Don't use ImageGrid in demo_text_rotation_mode.#15281
Don't use ImageGrid in demo_text_rotation_mode.#15281timhoffm merged 1 commit intomatplotlib:masterfrom
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.
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