Skip to content

[Doc]: Invert Axes example sets x-lims directly #28050

Closed
@rcomer

Description

@rcomer

Documentation Link

https://matplotlib.org/devdocs/gallery/subplots_axes_and_figures/invert_axes.html

Problem

This example shows how to invert the x-axis by using ax.set_xlim. I would have expected it to use the set_inverted method on the x-axis: that is more flexible as it doesn't prevent autoscaling on subsequent calls.

I note that this example pre-dates the addition of set_inverted to the library.

Suggested improvement

Either change the existing code to use set_inverted or add a second figure within the example to show its use.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions