==[[Python matplotlib]]==[[Python]] | [[Python NumPy]]| {{category [[Category:グラフ}}]]
*http://matplotlib.sourceforge.net/
sudo apt-get install python-matplotlib
=====[[CentOS ]] で PIPを利用してインストール=====
# pip install matplotlib
# pip install python-dateutil
# pip install pyparsing
=====[[Windows ]] で パッケージをダウンロードしてインストール=====
*http://matplotlib.org/downloads.html からダウンロード
=====[[Windows ]] で PIPを利用してインストール=====*Microsoft Visual C++ Compiler for [[Python ]] 2.7
**http://www.microsoft.com/en-us/download/confirmation.aspx?id=44266
*tcl ライブラリが見つからないエラー
**http://typea.info/blg/glob/2015/07/python-windows-virtualenv[[vi]]rtualenv-tcl.html**activate.bat に set "TCL_LIBRARY=C:\Python27[[Python]]27\tcl\tcl8.5" を追記*[[Python WindowsにPIPをインストール|PIP] [PIP] C:\Python27[[Python]]27\Scripts>pip install matplotlib C:\Python27[[Python]]27\Scripts>pip install python-dateutil C:\Python27[[Python]]27\Scripts>pip install pyparsing
===グラフウィンドウ===
====表示確認====
*['pdf', 'pgf', 'Qt4Agg', 'GTK', 'GTKAgg', 'ps', 'agg', 'cairo', 'MacOSX', 'GTKCairo', 'WXAgg', 'template', 'TkAgg', 'GTK3Cairo', 'GTK3Agg', 'svg', 'WebAgg', 'CocoaAgg', 'emf', 'gdk', 'WX']
=====WebAggの例=====
----
import matplotlib
matplotlib.use("WebAgg")
plt.show()
[[File:1054_matplotlib_graph_window02.png]]
===終了===
*plt.cla(): Axesをクリア
*plt.clf(): figureをクリア
*plt.close(): プロットを表示するためにポップアップしたウィンドウをクローズ
===例===
=====例1=====