Fix Python – Invert image displayed by imshow in matplotlib

Question

Asked By – pratikm

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?

Now we will see solution for issue: Invert image displayed by imshow in matplotlib


Answer

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

This question is answered By – wim

This answer is collected from stackoverflow and reviewed by FixPython community admins, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0