1 year ago
#349225
Giampaolo Levorato
How to add color and drape to 3D plot
I have used the following code:
import numpy as np
import matplotlib.pyplot as plt
def f(x, y):
return ( ((np.log(x**2) / np.log(y**3)) / x**2 )*500)
x = np.linspace(0, 600, 4)
y = np.linspace(0, 1000, 4)
X, Y = np.meshgrid(x, y)
Z = f(X,Y)
fig = plt.figure()
ax = plt.axes(projection='3d')
ax.contour3D(X, Y, Z, 50, cmap='binary')
ax.set_xlabel('x')
ax.set_ylabel('y')
ax.set_zlabel('z')
to create the following 3D plot:
How can I color the 3D plot in "purple" and add a drape over it?
python
matplotlib
matplotlib-3d
draper
0 Answers
Your Answer