I have a series of data from device. How can i make cubic interpolation or FIT for this plot?
import matplotlib.pyplot as plt
a = [[1,1,1],[2,2,2],[3,3,3]]
b = [[1,2,3],[1,2,3],[1,2,3]]
c = [[3,2,1],[1,4,2],[4,5,1]]
fig1 = plt.figure()
ax1 = fig1.add_subplot(111)
fig1.set_size_inches(3.54,3.54)
#Create Contour plot
contour=ax1.contour(a,b,c)
plt.show()
You can adapt @Joe Kington's suggestion and use
scipy.ndimage.zoom
which for your case of a cubic interpolation fits perfectly:Which gives: