- Python数据科学简介
- Python数据科学开发环境
- Python Pandas库
- Python Numpy库
- Python Scipy库
- Python Matplotlib库
- Python数据处理
- Python数据可视化
- 统计数据分析
Python 3D图
Python也能够创建三维图表。 它涉及将一个子图添加到现有的二维图并将投影参数指定为3d
。
绘制3D图表
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()
执行上面示例代码,得到以下结果 -
上一篇:Python气泡图
下一篇:Python时间序列
关注微信小程序
扫描二维码
程序员编程王