Suresh Pillai wrote: > I am using imshow to visualise matrices. When I use align='upper' > (default), the origin is still displayed in the lower left corner on the > axes - i.e. the y-axis is wrong. The data is plotted correctly with the > origin in the upper left corner. > > Seems to be a bug?
No, this is just the way it was designed and has always been. You can use the "extent" kwarg to control the axes: * origin is either upper or lower, which indicates where the [0,0] index of the array is in the upper left or lower left corner of the axes. If None, default to rc image.origin * extent is a data xmin, xmax, ymin, ymax for making image plots registered with data plots. Default is the image dimensions in pixels See the code in axes.spy() for an example of how to get what you want using imshow and the extent kwarg; or use pylab.matshow instead of pylab.imshow. (Probably there should be an axes.matshow convenience method, with pylab.matshow as a wrapper that autogenerates a figure if needed. But at the moment there isn't.) Eric > > Cheers, > Suresh > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users