Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gridspec.Gridspec doesn't check for consistency in arguments #5835

Closed
@goretkin

Description

@goretkin

If width_ratios is too small, it fails pretty late too, only when you go to add the subplot.

import matplotlib
import matplotlib.pyplot

gs = matplotlib.gridspec.GridSpec(1,2, width_ratios=[2, 1, 3], height_ratios=[3,4])
plt.gcf().add_subplot(gs[0])
plt.gcf().add_subplot(gs[1])
plt.gcf().savefig("gridspec_issue.png", facecolor="grey")

gridspec_issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions