Skip to content

get_subplot_params behavior doesn't match docstring #13109

Closed
@anntzer

Description

@anntzer

Extracted from #13105:

In gridspec.py, for the GridSpec class:

    def get_subplot_params(self, figure=None, fig=None):
        """
        Return a dictionary of subplot layout parameters. The default
        parameters are from rcParams unless a figure attribute is set.
        """

but the implementation clearly always drops the figure attributes; IOW it always returns a copy of self completely ignoring figure.

Conversely, GridSpecFromSubplotSpec.get_subplot_params does check for None attributes (but isn't documented to do so).

What a mess, as usual.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions