Skip to content

API: Don't add extra attributes to matplotlib axes #54485

Open
@mroeschke

Description

@mroeschke

Currently there's a few areas where pandas adds extra attributes to a matplotlib axis

def _ts_plot(self, ax: Axes, x, data, style=None, **kwds):

orig_ax.right_ax, new_ax.left_ax = new_ax, orig_ax

Since axes are stateful and there no way to clear these attributes via matplotlib public APIs, these attributes can cause issues when they are reused (discovered by running tests via pytest-randomly)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions