plot 3d with different backends
Project description
draw3d工具包
本项目旨在使用不同的Python绘图后端绘制三维规则图形
1. 安装
pip install draw3d
2. 使用示例
2.1 Matplotlib后端
import matplotlib.pyplot as plt
axGlob = plt.axes(projection='3d')
MatplotPainter.drawCube(axGlob, 0, 0, 0, 0.5, 0.5, 0.5) # 绘制cube
MatplotPainter.drawCylinder(axGlob, 0.5, 0, 0, 1, 0.5, 0.5, alpha=0.8, main_axis='x') # 绘制圆柱体
MatplotPainter.setAxisLimits(axGlob, 2, 2, 2) # 设置各坐标轴范围
MatplotPainter.setInitView(axGlob, 50, 50) # 设置初始视角
plt.show() # 显示图形
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
draw3d-0.0.1.tar.gz
(4.3 kB
view hashes)
Built Distribution
draw3d-0.0.1-py3-none-any.whl
(4.7 kB
view hashes)