Invert image displayed by imshow in matplotlib


Question

I wanted the imshow() function in matplotlib.pyplot to display images the opposite way, i.e upside down. Is there a simple way to do this?

1
71
12/6/2011 6:20:14 AM

Accepted Answer

Specify the keyword argument origin='lower' or origin='upper' in your call to imshow.

120
12/6/2011 6:24:06 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon