0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Python】Matplotlibでの折れ線グラフの描画

Posted at

Matplotlibで次の折れ線グラフを描画する。

image.png

x、y1、y2は、次の数値が定義されているものとする。

x = [1, 2, 3]
y1 = [4, 5, 6]
y2 = [7, 8, 9]

fig, ax = plt.subplots()
ax.plot(x, y1)
ax.plot(x, y2)

1つのグラフに複数のデータを表示する場合、このように「ax.plot」を2つ記述するだけです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?