We have learned how to use the imshow() method to plot two-dimensional color images. By default, imshow() uses the top left corner of the axes as the origin (0, 0) in data co-ordinates and fills the image with respect to these co-ordinates. If we want to change this to the lower left corner, and also extend the data limits along each of the axis, then the origin and extent arguments of the imshow() method help.
Using origin and extent for image orientation
Getting ready
Import the required libraries:
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator