<div dir="ltr">There is also a tutorial addressing the ways that `origin` and `extent` interact with each other: <a href="https://matplotlib.org/tutorials/intermediate/imshow_extent.html">https://matplotlib.org/tutorials/intermediate/imshow_extent.html</a><div><br></div><div>As for the transpose, that is due to one branch of math teaching use to think (x, y) and different branch of math teaching us to think (row, column).  For `imshow` we use the second one which is consistent with how numpy's repr of on array.  It would be confusing if the data for `my_array[0, :]` was displayed as the first _column_ of the image.</div><div><br></div><div>I do not disagree that this is frustrating/confusing, there is a comment in some of my grad school code which is basically "getting the (x,y) vs (r,c) conversions right here took you an afternoon, don't touch this again!" ;)</div><div><br></div><div>Tom</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 6, 2019 at 9:31 AM Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>This is discussed in the description of the "origin" keyword argument:</div><div><br></div><div><dl><dt><strong>origin</strong> <span class="gmail-m_586727888737525070gmail-classifier-delimiter">:</span> <span class="gmail-m_586727888737525070gmail-classifier">{'upper', 'lower'}, optional</span></dt>
<dd><p class="gmail-m_586727888737525070gmail-first">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, <code class="gmail-m_586727888737525070gmail-docutils gmail-m_586727888737525070gmail-literal gmail-m_586727888737525070gmail-notranslate"><a class="gmail-m_586727888737525070gmail-reference gmail-m_586727888737525070external" href="https://matplotlib.org/tutorials/introductory/customizing.html#matplotlib-rcparams" target="_blank"><span class="gmail-m_586727888737525070gmail-pre">rcParams["image.origin"]</span></a></code> is used, defaulting to 'upper'.</p>
<p class="gmail-m_586727888737525070gmail-last">Note that the vertical axes points upward for 'lower'
but downward for 'upper'.</p>
</dd></dl></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 6, 2019 at 9:25 AM Neal Becker <<a href="mailto:ndbecker2@gmail.com" target="_blank">ndbecker2@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I just wasted quite a bit of time trying to debug my code.  It took a long <br>
time because I was using imshow to debug, and didn't know that imshow <br>
displays a matrix not using cartesian coordinates.  The axes are transposed <br>
and one axis is reversed.  The documentation doesn't mention this.<br>
<br>
Thanks,<br>
Neal<br>
<br>
_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org" target="_blank">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
</blockquote></div>
_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org" target="_blank">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Thomas Caswell<br><a href="mailto:tcaswell@gmail.com" target="_blank">tcaswell@gmail.com</a></div>