#プログラミング #python #初心者
import japanize_matplotlib # 日本語フォントを有効にする
import matplotlib.pyplot as plt
# データ
x = [1, 2, 3, 4, 5]
y = [10, 20, 15, 30, 25]
# グラフの描画
plt.plot(x, y, marker=’o’, linestyle=’-‘, color=’b’, label=”データ1″)
# ラベル・タイトル
plt.xlabel(“X軸ラベル”)
plt.ylabel(“Y軸ラベル”)
plt.title(“サンプルグラフ”)
plt.legend()
plt.grid()
plt.show()
print(“ok”)
コメント