[Matplotlib-users] Why are matplotlib RGB images of dimensions (row, column, plane)

Benjamin Root ben.root at ou.edu
Wed Aug 5 15:09:16 CEST 2015

I think it has to do with the conventions used by PIL way back in the day.
To me, the current conventions make sense to me because imshow can work
with just a simple 2D image. Color is then additional dimensions (and thus
at the end).  If I slice up an image like so: `im[20:40, 50:80]`, then
imshow will work as expected regardless if that image was a 2D grayscale
image or a 3D RGB[A] image.

Ben Root

On Wed, Aug 5, 2015 at 4:02 AM, Fabien <fabien.maussion at gmail.com> wrote:

> Hi all,
> just to follow up a quite intense discussion on the numpy mailing list
> about dimensions ordering: why are matplotlib RGB images of dimensions
> (row, column, plane) instead of the standard (plane, row, column)?
> I guess this has been asked thousand times but I can't seem to find the
> answer...
> Thanks!
> Fabien
> _______________________________________________
> 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/20150805/e89afbf7/attachment.html>

More information about the Matplotlib-users mailing list