概要
matplotlib で極座標系でプロットする方法について解説します。
座標を極座標系に設定する
pyplot.subplot(), pyplot.add_subplots()
など Axes を作成する関数で projection="polar"
または polar=True
を指定することで、極座標系の図を作成できます。
In [1]:

偏角の目盛りを設定する
Axes.set_thetagrids()
で偏角の目盛りを設定できます。
In [2]:

labels
引数も渡すことで、偏角の目盛りのラベルを数値以外に変更できます。
In [3]:

動径の目盛りを設定する
Axes.set_rgrids()
で動径の目盛りを設定できます。
In [4]:

labels
引数も渡すことで、動怪の目盛りのラベルを数値以外に変更できます。
In [5]:

angle
で動怪の目盛りを表示する角度を設定できます。
In [6]:

コメント