have two questions maybe someone can help me. I want to plot a stereographic projection with contoruf and want to color the higher parts in the Z direction in Matplotlib. For that i have two questions.
I’m plotting with contourf before im using meshgrid and griddata, the the other edges are not smooth how can i smooth them? i
I want to have a log scale in Z how can i do that, i tried to use ticker.LogLocator but then i got just some parts colored.
Here my code:
# craation of a 2D grid
xi = np.linspace(min(X), max(X))
yi = np.linspace(min(Y), max(Y))
X1, Y1 = np.meshgrid(xi, yi)
##### interpolation
Z1 = griddata(X, Y, Z,xi,yi)
plt.contourf(X1,Y1,Z1,50,cmap=plt.cm.rainbow,vmax=abs(Z1).max(),
locator=ticker.LogLocator)
plt.colorbar()
plt.xlim(-1,1)
plt.ylim(-1,1)
plt.show()
plt.set_zscale('log')
plt.set_xlabel('X')
plt.set_ylabel('Y')
plt.show()