में रंगीन वायरफ्रेम प्लॉट मैं z-value के अनुसार वायरफ़्रेम प्लॉट रंग देने की कोशिश कर रहा हूं। मुझे इंटरनेट पर कोई कोड उदाहरण नहीं मिल रहा है।matplotlib
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
import matplotlib.pyplot as plt
# some numbers for the data
P=12000 #W
Q=1 #kg/s
DT=3 #K
cp=4169.32 #J/kgK
dDT=np.logspace(-2,0,20,endpoint=True)
dQ=Q*np.logspace(-3,-1,20,endpoint=True)
# the plotting data
m1,m2=np.meshgrid(dDT,dQ)
err=cp*np.sqrt((m1*Q)**2+(m2*DT)**2)/P
# the wiremesh plot that i need fixed
fig=plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot_wireframe(m1, m2, err, color=err/err.max(),cmap='jet')
ax.set_xlabel('dDT')
ax.set_ylabel('DQ')
ax.set_zlabel('relative error')
# the surface plot that has the colors i want
fig = plt.figure()
ax = fig.gca(projection='3d')
surf = ax.plot_surface(m1, m2, err,rstride=1, cstride=1, cmap=cm.jet,
linewidth=0.1, antialiased=False)
fig.colorbar(surf, shrink=0.5, aspect=5)
ax.set_xlabel('dDT')
ax.set_ylabel('DQ')
ax.set_zlabel('relative error')
plt.show()
किसी भी मदद के लिए धन्यवाद:
यहाँ एक सतह साजिश रंग मैं चाहता हूँ और एक wireframe भूखंड जहाँ मैं तर्ज पर रंग प्राप्त करने के लिए प्रबंधन नहीं कर सकते है कि का एक उदाहरण है!
http://stackoverflow.com/questions/24909256/how-to-obtain-3d-colored-surface-via-python/24958192#24958192 की संभावित डुप्लिकेट? – GBy