Reputation: 572
I am using python matplotlib for drawing a 3d surface. I'd like to draw only the surface and not the underlying coordinates grid which appears on each plane. Here's my code:
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
nb = 40
Z = np.random.randn(nb, nb)
Z = np.absolute(Z)
fig = plt.figure()
ax = fig.gca(projection='3d')
X = Y = np.arange(1., nb+1, 1)
X, Y = np.meshgrid(X, Y)
ax.plot_surface(X, Y, Z, cmap = cm.coolwarm, inewidth = 0, antialiased=True)
ax.view_init(azim=45)
ax.grid(b=False)
plt.grid(b=False)
plt.show()
But the graphic still show the wire coordinates
How can I get ride of these? I tryed grid(b=False) but dont worked.
Upvotes: 0
Views: 222
Reputation: 116
Remove this line
plt.grid(b=False)
and it should work fine.
Upvotes: 1