This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
python:matplotlib:基本的な使い方 [2018/01/17 19:27] koudai 作成 |
python:matplotlib:基本的な使い方 [2018/01/20 21:49] koudai |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== 概要 ====== | ====== 概要 ====== | ||
+ | |||
+ | matplotlibの必要最低限の使い方を解説します。 | ||
+ | |||
+ | |||
+ | ====== 関数のプロット ====== | ||
+ | |||
+ | 三角関数を例に、関数のプロット方法と簡単な調節の仕方を紹介します。 | ||
+ | |||
+ | ===== sin関数のプロット ===== | ||
+ | |||
+ | <file python> | ||
+ | import numpy as np | ||
+ | import matplotlib.pyplot as plt | ||
+ | |||
+ | x = np.arange(-np.pi, | ||
+ | y = np.sin(x) | ||
+ | |||
+ | plt.plot(x, y) | ||
+ | plt.show() | ||
+ | </ | ||
+ | |||
+ | |||
+ | ====== データのプロット ====== | ||
+ | |||
+ | |||
+ | |||