Invert image displayed by imshow in matplotlib

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


You can use the extent argument. For example, if X values range from -10 and 10 and Y values range from -5 to 5, you should pass extent=(-10,10,-5,5) to imshow().