Skip to content

Adding GridSpec.subplots? #14155

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

Closed
anntzer opened this issue May 7, 2019 · 2 comments
Closed

Adding GridSpec.subplots? #14155

anntzer opened this issue May 7, 2019 · 2 comments
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented May 7, 2019

A variant on #13280, that I'm opening as an issue for now as there was quite some pushback against #13280 so I won't bother implementing this proposal if there's the same pushback against it :)

I'm proposing to add GridSpec.subplots() (or .add_subplots(), depending on how we want to bikeshed it), such that

axs = plt.figure().add_gridspec(
    nrows, ncols, height_ratios=..., width_ratios=...).subplots()

is equivalent to

axs = plt.figure().subplots(
    nrows, ncols, gridspec_kw={"height_ratios": ..., "width_ratios": ...})

the goal being just to get rid of the somewhat awkward gridspec_kw (it's a bunch of (kw)args passed down to another function, so we should just directly call that other function instead).

Thoughts?

This would also fix #1460, I'd say (as subplot_kw could be directly passed to GridSpec.subplots`).

mpl master.

@anntzer anntzer added this to the v3.2.0 milestone May 7, 2019
@anntzer anntzer mentioned this issue Jun 2, 2019
6 tasks
@timhoffm timhoffm modified the milestones: v3.2.0, v3.3.0 Aug 15, 2019
@QuLogic
Copy link
Member

QuLogic commented May 7, 2020

So this is fixed by #14421, no?

@QuLogic QuLogic closed this as completed May 7, 2020
@anntzer
Copy link
Contributor Author

anntzer commented May 7, 2020

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants