【python】使用plotly画三维立体高逼格图,数据可视化
使用plotly画三维立体高逼格图,代码传送门:
import plotly.graph_objects as go
import numpy as np
np.random.seed(1)
N = 70
fig = go.Figure(data=[go.Mesh3d(x=(70*np.random.randn(N)),
y=(55*np.random.randn(N)),
z=(40*np.random.randn(N)),
opacity=0.5,
color=\'rgba(244,22,100,0.6)\'
)])
fig.update_layout(
scene = dict(
xaxis = dict(nticks=4, range=[-100,100],),
yaxis = dict(nticks=4, range=[-50,100],),
zaxis = dict(nticks=4, range=[-100,100],),),
width=700,
margin=dict(r=20, l=10, b=10, t=10))
fig.show()
效果图:
版权声明:本文为helenlee01原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。