X Tutup
Skip to content

Number of subplots in mpl.axes.Subplot object #7591

@nschloe

Description

@nschloe

From an mpl.axes.Subplot obj, I can find out information about the grid pattern via

geom = obj \
    .get_subplotspec() \
    .get_topmost_subplotspec()\
    .get_geometry()

For example, the product geom[0] * geom[1] gives the maximum number of subplots in the grid.

Q: Is there a way for finding out how many subplots there actually are?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup