X Tutup
Skip to content

plt.subplots return is inconsistent #8571

@KeithWM

Description

@KeithWM

This is not a bug, but a feature that I contend is implemented incorrectly.

When generating multiple subplots using fig, ax = plt.subplots(nrows, ncols) the returned 'axes' object(s) depend inconveniently on the number of rows and columns specified. Currently, the axes object is either a single object, a vector ax[i] or a matrix ax[i,j]. If the number of rows and/or columns is dynamically specified, this leads to convoluted programming to catch the different cases.

I believe it would be much more straightforward if it always returned an array of axes objects. If it can not be made the default, can it at least be added as a possibility via a keyword argument?

If this issue has been raised before, I apologise.

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