Python-3D图表

Python-3D图表 (Python - 3D Charts)

Python is also capable of creating 3d charts. It involves adding a subplot to an existing two-dimensional plot and assigning the projection parameter as 3d.

Python还能够创建3d图表。 它涉及将子图添加到现有的二维图,并将投影参数分配为3d。

绘制3D图 (Drawing a 3D Plot)

3dPlot is drawn by mpl_toolkits.mplot3d to add a subplot to an existing 2d plot.

3dPlot由mpl_toolkits.mplot3d绘制,以将子图添加到现有的2d图中。


from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt


chart = plt.figure()
chart3d = chart.add_subplot(111, projection='3d')

# Create some test data.
X, Y, Z = axes3d.get_test_data(0.08)

# Plot a wireframe.
chart3d.plot_wireframe(X, Y, Z, color='r',rstride=15, cstride=10)

plt.show()
 

Its output is as follows −

输出如下-

3dplot.png

翻译自: https://www.tutorialspoint.com/python_data_science/python_3d_charts.htm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值