import matplotlib.pyplot as plt
import numpy as np
import math
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.add_subplot(111)
x= np.linspace(-math.pi,math.pi,30)
y= np.linspace(-math.pi,math.pi,30)
xx,yy = np.meshgrid(x,y)
X_grid, Y_grid = np.meshgrid(x,y)
print("X_grid shape: ",X_grid.shape)
zz =-2*(np.cos(xx) + np.cos(yy))
#ax = plt.axes(projection='3d')
ax = Axes3D(fig)
ax.plot_surface(xx,yy,zz)
plt.xticks([x[0],x[int(len(s)/2)], x[-1]], [r'$-\pi$', r'$0$', r'$-\pi$' ])
plt.yticks([y[0],y[int(len(s)/2)], y[-1]], [r'$-\pi$', r'$0$', r'$-\pi$' ])
plt.xlabel("kx")
plt.ylabel("ky")
Bug report
Bug summary
I'm unable to find anywhere that we can set the
zticklikextickandytickor is there a way ?Code for reproduction
Actual outcome
Please see this.
Expected outcome
In output
z-axisshould have the values likexandyaxis ([-math.pi,0,math.pi]).Matplotlib version
print(matplotlib.get_backend())): Qt5AggWorking on
Spyder.