我正在遵循本指南,以使用plotly(https://plot.ly/python/3d-surface-plots/)实现带有轮廓的曲面图。 我设法在x,y,z平面上具有3D曲面和3个投影,但是我无法管理countorf投影(我的意思是填满了投影线)
import plotly.plotly as py
import plotly.graph_objs as go
data = []
Z = df360_pivot.values.T
Y = df360_pivot.columns.values
X = df360_pivot.index.values
print(np.shape(X),np.shape(Y),np.shape(Z)) # printed (110,) (10,) (10, 110)
surface = go.Surface(x=X,
y=Y,
z=Z,
colorscale='Viridis',
contours=go.surface.Contours(
x=go.surface.contours.X(show=True,
usecolormap=True,
highlightcolor="#42f462",
project=dict(x=True)), #this is the line pjection but I cannot manage to have it filled as a surface
y=go.surface.contours.Y(show=True,
usecolormap=True,
highlightcolor="#42f462",
project=dict(y=True)), #this is the line pjection but I cannot manage to have it filled as a surface
z=go.surface.contours.Z(show=True,
usecolormap=True,
highlightcolor="#42f462",
project=dict(z=True)))) #this is the line pjection but I cannot manage to have it filled as a surface
data.append(surface)
print(len(data))
fig = go.Figure(data=data)
py.iplot(fig, filename='Parametric_plot')