import matplotlib.pyplot as plt
x = [-10, 10]
y = [-10, 10]
plt.plot(x, y) # y = x の直線を描く
plt.title("y = x") # グラフのタイトル
plt.xlabel("x") # x軸ラベル
plt.ylabel("y") # y軸ラベル
plt.grid(True) # グリッド(目盛り線)を表示
plt.show()
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme