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

ENH: add width_ratios and height_ratios to subplots#23191

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
QuLogic merged 1 commit intomatplotlib:mainfromjklymak:enh-add-wr-hr
Jun 28, 2022

Conversation

jklymak
Copy link
Member

@jklymakjklymak commentedJun 2, 2022
edited
Loading

PR Summary

I'm guessing 99.9% of the use of gridspec_kws is to set the height or width ratios of axes. And it is pretty esoteric to ask people to know about gridspecs in order to access this. Here we addwidth_ratios andheight_ratios to the subplots and subplot_mosaic calls.

Previously we would do

fig,axs=plt.subplots(1,2,gridspec_kw={'width_ratios': [1,2]})

This PR allows

fig,axs=plt.subplots(1,2,width_ratios=[1,2])

PR Checklist

Tests and Styling

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (installflake8-docstrings and runflake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).

story645 reacted with thumbs up emojircomer reacted with heart emoji
@story645story645 marked this pull request as ready for reviewJune 2, 2022 17:38
@story645story645 marked this pull request as draftJune 2, 2022 17:39
Copy link
Member

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

👍 I support the idea.

@jklymakjklymakforce-pushed theenh-add-wr-hr branch 2 times, most recently from04b6ea9 tof1a8cceCompareJune 7, 2022 10:50
@jklymakjklymak marked this pull request as ready for reviewJune 10, 2022 06:57
@jklymak
Copy link
MemberAuthor

This is ready to go, and I'll argue its a pretty big quality of life enhancement for anyone making different-width/height plots.

story645 reacted with thumbs up emoji

@jklymakjklymakforce-pushed theenh-add-wr-hr branch 3 times, most recently from2e60682 to17978e7CompareJune 13, 2022 11:27
@QuLogicQuLogic linked an issueJun 21, 2022 that may beclosed by this pull request
@jklymak
Copy link
MemberAuthor

@story645 got time for a quick second look?

@anntzer
Copy link
Contributor

anntzer commentedJun 23, 2022
edited
Loading

Sorry for being late to the party, but see also#21942 (comment).
Edit:@jklymak made a strong reply at#21942 (comment).

@tacaswelltacaswell added this to thev3.6.0 milestoneJun 24, 2022
Copy link
Member

@tacaswelltacaswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Anyone can merge on CI green.

@jklymak
Copy link
MemberAuthor

Squashed and rebased on master so font fix should be in there...

@QuLogicQuLogic merged commitb02334b intomatplotlib:mainJun 28, 2022
@jklymakjklymak deleted the enh-add-wr-hr branchJune 28, 2022 06:53
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm left review comments

@tacaswelltacaswelltacaswell approved these changes

@QuLogicQuLogicQuLogic approved these changes

@story645story645story645 approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.6.0
Development

Successfully merging this pull request may close these issues.

[ENH]: add width/height_ratios to subplots and friends
6 participants
@jklymak@anntzer@tacaswell@QuLogic@story645@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp