LoginSignup
0
0

More than 3 years have passed since last update.

matplotlibを使って●をプロット|Python

Posted at

平面座標で円を描く

X-Y平面上に点をプロットすることはできますが、円を描くことはどうでしょうか。
こんなふうに円の描画をすることができます。
スクリーンショット 2020-06-17 21.33.22.jpg

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 について[英文]

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0