我正在尝试使用plotly创建3D图形,但我得到了错误:
未定义散点3D
我正在使用jupyterlab,并通过anaconda访问它,所有的东西都更新了,包括绘图文件。
import chart_studio.plotly as py
import plotly.graph_objects as go
trace1=Scatter3d(x=Xe,
y=Ye,
z=Ze,
mode='lines',
line=Line(color='rgb(125,125,125)', width=1),
hoverinfo='none'
)
trace2=Scatter3d(x=Xn,
y=Yn,
z=Zn,
mode='markers',
name='actors',
marker=Marker(symbol='dot',
color=eigen,
size=6,colorbar=ColorBar(
title='Colorbar'
),
colorscale='Viridis',
line=Line(color='rgb(158,18,130)', width=0.5)
),
text=labels,
hoverinfo='text'
)当执行代码时,它会在trace1本身停止。
发布于 2021-03-01 22:47:39
这意味着
方法未定义,换句话说,您没有正确地导入或调用它。使用
然后
看看是否
都在这两个名单中。如果是,那么您没有正确地调用它。
此外,您还可以将import语句从
至
..。
https://stackoverflow.com/questions/66424046
复制相似问题