トップページ > コンテンツ > 機械学習関連 > 機械学習のライブラリ > matplotlib

書き方の例を殴り書き。

import matplotlib.pyplot as plt
def f(x)
  return xxx

x = np.arrange(最初,最後,間隔)
plt.figure() #一枠の確保
plt.subprot(行数,列数,左上から右下のうち番目) #一枠内に複数グラフを置ける。
plt.legend() #凡例つける
plt.plot(x,fx, label="関数")
plt.show() #結果画像の表示
plt.saveflg('保存ファイル名') #結果画像の保存
最終更新:2018年11月23日 22:01