'matplotlib'에 해당되는 글 2

  1. 2014.05.22 matplotlib 맛보기
  2. 2013.12.01 IPython에서 그래프 그려서 설치 확인 - Python 3(matplotlib, NumPy, pandas)

matplotlib 맛보기

- 설치

- 확인

  

IPython에서 그래프 그려서 설치 확인 - Python 3(matplotlib, NumPy, pandas)

Enthought Python Distribution (EPD)나 Python(x,y) 배포판이 좋다고 함.
그러나 기존에 설치된 Python을 삭제하기 싫어서 직접 설치함.

- Python 3.3과 easy_install이 설치된 상태

- IPython
http://ipython.org/index.html
http://ipython.org/ipython-doc/stable/install/install.html

> easy_install pyreadline
> easy_install ipython
> iptest3
//에러
> easy_install nose
> iptest3


- 그래프 그려서 설치 확인하기

> ipython3 --pylab
...
ImportError: No module named 'matplotlib'


- matplotlib
http://matplotlib.org/index.html
http://matplotlib.org/downloads.html
matplotlib-1.3.1.win32-py3.3.exe
pip로도 설치됨.

> ipython3 --pylab
...
ImportError: matplotlib requires dateutil


- dateutil
> easy_install python_dateutil

> ipython3 --pylab
...
ImportError: matplotlib requires pyparsing

- pyparsing
> easy_install pyparsing

> ipython3 --pylab
...
ImportError: No module named 'numpy'


- NumPy
http://www.numpy.org/
http://www.scipy.org/scipylib/download.html
numpy-1.8.0-win32-superpack-python3.2.exe //버전이 맞지 않아서 설치가 안된다.
Unofficial Windows Binaries for Python Extension Packages에서 numpy-MKL-1.8.0.win32-py3.3.exe를 받아서 설치
Windows에서는 pip를 이용하면 MKL이 설치되지 않아 scipy 설치시 문제가 된다. Numpy+MKL을 설치한다.

> ipython3 --pylab
//OK

- pandas
> easy_install pandas

> ipython3 --pylab
In [1]: import pandas
In [2]: plot(arange(10))


- IPython HTML Notebook
> ipython3 notebook --pylab=inline
...
ImportError: No module named 'zmq'

- pyzmq
> easy_install pyzmq

> ipython3 notebook --pylab=inline
...
ImportError: No module named 'tornado'

- tornado
> easy_install tornado

> ipython3 notebook --pylab=inline //제대로 실행이 되면 브라우저가 자동으로 열린다.

- Notebook을 하나 생성하고 코드를 입력한 뒤, 실행시켜본다.