本人在学习完制作双波源干涉现象的的二维Contour Plots图像之后,发现 plotly 还有3D 图像制作,也就是3D Surface Plots,这个更能展示双波源干涉现象的结果,果然学之。中间有些地方要说明一下,3D Surface Plots图表默认的底部是正方形,所以我采用了100*100的干涉图,然后加上一层透明的图标,让图像压扁,不然图标的上下限就是
x=np.linspace(-5,5,100)y=np.linspace(-5,5,100)x,y=np.meshgrid(x,y)z=np.sin(np.sqrt(x**2+y**2))# Create a 3D surface plot fig=go.Figure(data=[go.Surface(z=z,x=x,y=y)])# Add title and labels fig.update_layout(title='3D Surface Plot',scene=dict(xaxis_title='X-ax...
x=np.linspace(-5,5,100)y=np.linspace(-5,5,100)x,y=np.meshgrid(x,y)z=np.sin(np.sqrt(x**2+y**2))# 创建3D曲面图 fig=go.Figure(data=[go.Surface(z=z,x=x,y=y)])# 添加标题和标签 fig.update_layout(title='3D Surface Plot',scene=dict(xaxis_title='X-axis',yaxis_title='Y...
Box Plots, Horizontal Box Plot, Grouped Box Plot Histograms, Stacked Histograms 2d Density Plots Heatmaps Waterfall charts Indicators Funnel Maps Contour Plots 2d Density Plots Ternary Plots Ribbon Plots 3D Surface Plots 3D Scatter Plot 3D Mesh Plots 3D Line Plots Можливості ві...
= go.Figure(data=[go.Surface(z=z, x=x, y=y)]) fig.update_layout(title='3D Surface Plot...
fig.update_layout(title='3D Surface Plot', scene=dict(xaxis_title='X-axis', yaxis_title='Y-axis', zaxis_title='Z-axis')) # 显示图表 fig.show() 使用示例数据和go.Figure创建3D曲面图。 04 动画线条图 import plotly.graph_objects as go ...
# Create a 3D surface plot fig = go.Figure(data=[go.Surface(z=z, x=x, y=y)]) # Add title and labels fig.update_layout(title='3D Surface Plot', scene=dict(xaxis_title='X-axis', yaxis_title='Y-axis', zaxis_title='Z-axis')) ...
)4、3D-surface图 这里我们的图的代码不来详细的介绍,这个在这里展示出来,给大家看一下plotly做出的3D图的效果。这里的例子是参考官网的例子。对于这种3D-surface的图来说,可以用来很好的展示机器学习中梯度下降的内容。网址链接: https://plot.ly/python/3d-surface-plots/ plotly这个可视化工具,你可还喜欢?
, zaxis_title='Z'), title='3D Surface Plot') fig.show()以上代码将生成一个展示了函数表...
fig = go.Figure(data=[go.Surface(z=z, x=x, y=y)]) fig.update_layout(title='3D Surface Plot', scene=dict(xaxis_title='X-axis', yaxis_title='Y-axis', zaxis_title='Z-axis')) fig.show() 1. 2. 3. 4. 5. 6. 7.