ax = plt.subplot()
xi, yi = np.linspace(195.226, 391.226, 50), np.linspace(4108.9341, 
    4304.9341, 50)
img = mpimg.imread('4d4178c16eb7aaf6.png')
ax.imshow(img, extent=[min(xi), max(xi), min(yi), max(yi)])
height = np.array(list(csv.reader(open('terr_grd.csv', 'tr'), delimiter=','))
    ).astype('float')
terrf = ax.contourf(xi, yi, height, 15, cmap=plt.cm.Blues, alpha=0.5)
terr = ax.contour(xi, yi, height, 15, colors='k', alpha=0.5)
ax.clabel(terr, fontsize=9, inline=1)
fig.savefig('theplot.png')
plt.show()
Plotting terrain as background using matplotlib