[Matplotlib-users] please document imshow axes order

Neal Becker ndbecker2 at gmail.com
Thu Jun 6 09:37:44 EDT 2019


The origin only discusses the inversion of the y axis - in addition
the x-y are transposed.

On Thu, Jun 6, 2019 at 9:30 AM Nathan Goldbaum <nathan12343 at gmail.com> wrote:
>
> 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"] 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



-- 
Those who don't understand recursion are doomed to repeat it


More information about the Matplotlib-users mailing list