【发布时间】:2021-10-07 00:04:12
【问题描述】:
我有一段代码可以制作出与此类似的情节:
import plotly.express as px
import plotly.graph_objects as go
df = px.data.tips()
fig = go.Figure(data =[go.Scatter3d(x = df['total_bill'],
y = df['time'],
z = df['tip'],
mode ='markers')])
fig.show()
我想添加一个具有不同符号的点并在其余点中查看它
我试过了
fig.add_trace(
go.scatter3d(x=[25],
y=['Dinner'],
z=[6],
mode='markers')
)
并给了我:
TypeError: 'module' object is not callable
可以吗? 这就是我要找的: enter image description here
【问题讨论】: