Inverted axis
This example demonstrates two ways to invert the direction of an axis:
If you want to set explicit axis limits anyway, e.g. via
set_xlim, you can swap the limit values:set_xlim(4, 0)instead ofset_xlim(0, 4).Use
Axis.set_invertedif you only want to invert the axis without modifying the limits, i.e. keep existing limits or existing autoscaling behavior.
