Closed
Description
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.