我是靠谱客的博主 孝顺时光,这篇文章主要介绍python画圆运用了什么函数,现在分享给大家,希望可以做个参考。

本教程操作环境:windows7系统、Python3版、Dell G3电脑。

python画圆代码

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from matplotlib.patches import Ellipse, Circle import matplotlib.pyplot as plt def plot_cicle(): fig = plt.figure() ax = fig.add_subplot(111) cir1 = Circle(xy = (0.0, 0.0), radius=2, alpha=0.5) ax.add_patch(cir1) x, y = 0, 0 ax.plot(x, y, 'ro') plt.axis('scaled') plt.axis('equal') #changes limits of x or y axis so that equal increments of x and y have the same length plt.show() plot_cicle()
登录后复制

1.png

以上就是python画圆运用了什么函数的详细内容,更多请关注靠谱客其它相关文章!

最后

以上就是孝顺时光最近收集整理的关于python画圆运用了什么函数的全部内容,更多相关python画圆运用了什么函数内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(84)

评论列表共有 0 条评论

立即
投稿
返回
顶部