直線で描く場合。
import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.plot([0,1],[0,1]) plt.show()

dashes 変数を使うと、点線の色あり、色なしの部分の幅を指定できる。以下はその例。
import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.plot([0,1],[0,1],dashes=[1,1]) plt.show()

import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.plot([0,1],[0,1],dashes=[4,1]) plt.show()

import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.plot([0,1],[0,1],dashes=[4,1,2]) plt.show()
