I have a slider bar which gives the line of a CSV file to be graphed. The slider bar is functional and will return the correct values. However, I can't get the values to show up on the graph. There are two things graphed a scatter plot (with 4 points) and a interpoated surface. The scatter plot shows up as expected. This is the update code:
def update (val):
ax.clear()
val=int(val)
new=a[val]
canvas1.blit(axsigma.bbox)
ax.scatter(x, y, marker='o', s=256, lw=.1)
xi, yi = np.mgrid[x.min():x.max():500j, y.min():y.max():500j]
newi = griddata(x,y,new,xi,yi, interp='nn')
CS = plt.contourf(xi,yi,newi,500,cmap='jet', vmax=5, vmin=0) ##This line should plot the new temperatures
ax.relim()
ax.autoscale_view(True,True,True)
Any advice would be greatly appreciated. Thanks in advance!