pratikm pratikm - 7 months ago 73
Python Question

Invert image displayed by imshow in matplotlib

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?

wim wim
Answer

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