Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

anntzer
Copy link
Contributor

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:
new
(admittedly the inability to set the absolute spacing between subplots is mildly annoying)

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code isFlake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

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])
Copy link
ContributorAuthor

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.

@ImportanceOfBeingErnest
Copy link
Member

I don't like that the orange boxes now touch the vertical spines.
The spacing between axes could be made smaller.

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 useImageGrid, I think one could just stay with it.

@anntzer
Copy link
ContributorAuthor

hspace=wspace=0 gives
new

I don't mind waiting for the discussion on#14421 to be resolved first.

@timhoffm
Copy link
Member

What's the motivation for the change? I don't see that either one is particularly be better than the other.

@anntzer
Copy link
ContributorAuthor

Ithink 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.

@jklymak
Copy link
Member

I agree w/@anntzer. I think, when possible, we should make examples use the core library, not things frommpl_toolkits. If thats not possible, I think we should work on making it possible.

@jklymak
Copy link
Member

If you rebase, please ping me for a review. I think we should change this.

@jklymakjklymak marked this pull request as draftApril 23, 2021 14:48
The example can be written without involving axes_grid.
@anntzer
Copy link
ContributorAuthor

rebased

@jklymakjklymak self-assigned thisApr 23, 2021
@timhoffm
Copy link
Member

timhoffm commentedApr 23, 2021
edited
Loading

Not a prerequisite for merging, but would "compressed-layout"#20016 help with the spacing?

@anntzer
Copy link
ContributorAuthor

possibly?

@anntzeranntzer marked this pull request as ready for reviewApril 23, 2021 22:46
@timhoffmtimhoffm added this to thev3.5.0 milestoneApr 23, 2021
@timhoffmtimhoffm merged commit5e3a0f3 intomatplotlib:masterApr 23, 2021
@anntzeranntzer deleted the demo_text_rotation_mode branchApril 23, 2021 23:25
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm approved these changes

Assignees

@jklymakjklymak

Projects
None yet
Milestone
v3.5.0
Development

Successfully merging this pull request may close these issues.

4 participants
@anntzer@ImportanceOfBeingErnest@timhoffm@jklymak

[8]ページ先頭

©2009-2025 Movatter.jp