pyplot grid で縦横線(罫線のようなもの)を引くことができる。
例
from matplotlib import pyplot as plt
data_x = [25,26,27]
data_y = [39,41,50]
data_y2 = [40,20,17]
plt.plot(data_x,data_y)
plt.plot(data_x,data_y2)
plt.grid(True)
plt.show()
雑記
投稿日:2021年6月11日 更新日:
pyplot grid で縦横線(罫線のようなもの)を引くことができる。
from matplotlib import pyplot as plt
data_x = [25,26,27]
data_y = [39,41,50]
data_y2 = [40,20,17]
plt.plot(data_x,data_y)
plt.plot(data_x,data_y2)
plt.grid(True)
plt.show()
執筆者:seyanen
関連記事
python3 で、csv ファイルの日付・数字を読み取る方法
csv をインポートすると、row in reader はリストになっている。 次のようにして、各行の要素を取り出して表示することができる。 例 import csv with open(‘data. …
arrowprops のパラメータは次を参考にして設定できる。 https://matplotlib.org/stable/api/_as_gen/matplotlib.patches.FancyAr …
y軸に、2種類のグラフを異なるスケールでプロットする。 matplotlib axes の twinx() を使う。 https://matplotlib.org/stable/api/_as_gen …
2023/01/18
matplotlib のグラフ作成と gnuplot との対応 比較
2022/10/14
pythonで配列(リスト)の、ある要素がわかっているときにその次の要素を取得する方法。