Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
で線を引きたいですx=c #constant。
x=c #constant
これはかなり簡単なはずですが、どうすればよいですか?
を使用できますmatplotlib.pyplot.axvline()。
matplotlib.pyplot.axvline()
import matplotlib.pyplot as plt plt.figure() plt.axvline(x=0.2) plt.axvline(x=0.5) plt.show()
matplotlib.pyplotの方法を使用axvlineする:
matplotlib.pyplot
axvline
import matplotlib.pyplot as plt plt.axvline(x=0.5)
y値の範囲を設定することもできます。
plt.axvline(x=0.5, ymin=0.2, ymax=0.4)
ymin = 0および のデフォルト値ymax = 1。
ymin = 0
ymax = 1