8000 [ENH]: add width/height_ratios to subplots and friends · Issue #21942 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
[ENH]: add width/height_ratios to subplots and friends #21942
Closed
< 897F !--$-->
@jklymak

Description

@jklymak

Currently we must do fig, ax = plt.subplots(1, 2, gridspec_kw={'width_ratios': [2, 1]}). This is pretty clunky, and we now try to shelter the user from the gridspec concept as much as possible. I don't see any reason we should not offer: fig, ax = plt.subplots(1, 2, width_ratios=[2, 1]). See also plt.subplots_mosaic.

I'm not sure about the wspace and hspace parameters. They are somewhat fragile as they get changed by layout managers, but they could also be exposed.

In the case of a clash between width_ratios and gridspec_kw={'width_ratios', []} probably the lower-level call should win.

Marking as Good First Issue, as hoisting this is quite easy, but any new contributors should probably watch this space for an OK as to whether this is generally acceptable.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0