python:matplotlib:基本的な使い方
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
python:matplotlib:基本的な使い方 [2018/01/20 21:53] – koudai | python:matplotlib:基本的な使い方 [2018/01/20 22:04] – koudai | ||
---|---|---|---|
Line 17: | Line 17: | ||
import matplotlib.pyplot as plt | import matplotlib.pyplot as plt | ||
- | x = np.arange(-np.pi, | + | x = np.arange(-np.pi, |
- | y = np.sin(x) | + | y = np.sin(x) |
- | plt.plot(x, y) | + | plt.plot(x, y) # 横軸をxとして y=y(x) のグラフをプロットする |
- | plt.show() | + | plt.show() |
</ | </ | ||
+ | それぞれのコードの意味はコメントを参照してください。 | ||
スクリプトができたら< | スクリプトができたら< | ||
+ | 保存するにはグラフが表示されたウィンドウの上の方にあるフロッピーディスクのマークをクリックします(Ctrlキーを押しながらsを押すのでも可)。 | ||
+ | |||
+ | {{: | ||
python/matplotlib/基本的な使い方.txt · Last modified: 2021/06/27 22:04 by 127.0.0.1