The following example shows how to display a .tif file, create a grid, and how to place a grid below other elements of the chart so that you can draw rectangles and lines on top of the image and grid.
import matplotlib.pyplot as plt
from PIL import Image
import matplotlib.patches as mpatches
im = Image.open('stinkbug.tif')
im1 = im.transpose(Image.FLIP_TOP_BOTTOM)
plt.imshow(im1)
ax = plt.gca()
ax.grid(True, color='r', linestyle='--', linewidth=2)
ax.set_axisbelow(True)
xy = 200, 200,
width, height = 100, 100
ax.add_patch(mpatches.Rectangle(xy, width, height, facecolor="none",
edgecolor="blue", linewidth=2))
plt.draw()
plt.show()
matplotlib.patches . , , matplotlib.lines.Line2D.
plt.axvline(x=0.069, ymin=0, ymax=40, linewidth=4, color='r')