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

Adding GridSpec.subplots? #14155

Closed
Closed
Milestone
@anntzer

Description

@anntzer

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 awkwardgridspec_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 (assubplot_kw could be directly passed to GridSpec.subplots`).

mpl master.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp