[Matplotlib-users] please document imshow axes order

Nathan Goldbaum nathan12343 at gmail.com
Thu Jun 6 09:30:39 EDT 2019


This is discussed in the description of the "origin" keyword argument:

*origin* : {'upper', 'lower'}, optional

Place the [0,0] index of the array in the upper left or lower left corner
of the axes. The convention 'upper' is typically used for matrices and
images. If not given, rcParams["image.origin"]
<https://matplotlib.org/tutorials/introductory/customizing.html#matplotlib-rcparams>
is used, defaulting to 'upper'.

Note that the vertical axes points upward for 'lower' but downward for
'upper'.

On Thu, Jun 6, 2019 at 9:25 AM Neal Becker <ndbecker2 at gmail.com> wrote:

> I just wasted quite a bit of time trying to debug my code.  It took a long
> time because I was using imshow to debug, and didn't know that imshow
> displays a matrix not using cartesian coordinates.  The axes are
> transposed
> and one axis is reversed.  The documentation doesn't mention this.
>
> Thanks,
> Neal
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20190606/f5d5b957/attachment.html>


More information about the Matplotlib-users mailing list