matplotlibを使って●をプロット|Python
2177 ワード
平面座標で円を描く
X-Y平面上に点をプロットすることはできますが、円を描くことはどうでしょうか。
こんなふうに円の描画をすることができます。
matplotlibを使用して描いてみます。
xyPlotCircle.py
import matplotlib
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
# 中心を (x, y) = (0.2, 0.2)に設定
# 半径0.2の円を描画
circle = plt.Circle((0.2, 0.2), 0.2, fc="#778800")
ax.add_patch(circle)
plt.show()
以上です。
・参考サイト
matplotlib.pyplot について[英文]
Author And Source
この問題について(matplotlibを使って●をプロット|Python), 我々は、より多くの情報をここで見つけました https://qiita.com/ProOJI/items/2d4129f2a32ce42101ca著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .