2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

PythonでMatplotlibを利用したグラフの描画サンプル

Last updated at Posted at 2021-01-25

生成したランダムな時系列データをプロットするサンプル。
実行すると以下のようにウィンドウが立ち上がり、グラフが描画されます。

>>> import random
>>> import matplotlib.pyplot as plt
>>> 
>>> y = [ random.random() * 100 for i in range(100) ]
>>> t = [ i in range(100) ]
>>> 
>>> plt.plot(t, y)
[<matplotlib.lines.Line2D object at 0x14b096730>]
>>> plt.show()

スクリーンショット 2021-01-24 21.47.54.png

2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?