I am drawing a contour plot with fixed range (0,100). However, my data contains only (0,1) and when I call
plt.contourf(X,Y,Z,np.linspace(0,100,101), interpolation='neither',extend='neither')
It generated blank areas.
Add the following line ahead of contourf function.
plt.imshow(Z,interpolation='nearest',extent=[0,100,ymin,ymax], vmin=0,vmax=100)
No comments:
Post a Comment