This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
python:matplotlib:基本的な使い方 [2018/01/20 21:52] koudai |
python:matplotlib:基本的な使い方 [2018/01/20 22:05] 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を押すのでも可)。 | ||
+ | |||
+ | {{: | ||