python-2.5.2
matplotlib -0.99.0.tar.gz 下载地址: http://sourceforge.net/projects/matplotlib/files/matplotlib/
numpy-1.3.0.tar.gz 下载地址:http://sourceforge.net/projects/numpy/files/NumPy/
scipy-0.11.0.tar.gz 下载地址:http://sourceforge.net/projects/scipy/files/scipy/0.11.0/
tar zxf numpy-1.3.0.tar.gz
cd numpy-1.3.0
python setup.py build
python setup.py install
tar zxf matplotlib-0.99.0.tar.gz
cd matplotlib-0.99.0
python setup.py build
python setup.py install
最后,matplotlib安装在 /opt/zhankunlin/python-2.5.2/lib/python2.5/site-packages/目录下,该目录是python第三方库的安装目录。
安装完毕,目录结构如下:
[root@glnode05 visualization]# ls /opt/python-2.5.2/lib/python2.5/site-packages/
dateutil matplotlib matplotlib-0.99.0-py2.5.egg-info mpl_toolkits numpy numpy-1.3.0-py2.5.egg-info pylab.py pylab.pyc pytz README
( Windows 下下载 exe 文件安装即可, 成功后安装在 D:\Python27\Lib\site-packages\ 目录下 )
[root@glnode05 matplotlib]# python
Python 2.5.2 (r252:60911, Apr 7 2012, 22:16:07)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.pyplot as plt
>>> plt.plot([1,2,3,4], [1,4,9,16], 'ro')
[<matplotlib.lines.Line2D object at 0x12c7050>]
>>> plt.axis([0, 6, 0, 20])
[0, 6, 0, 20]
>>> plt.show()
相关使用以后附上,这里有一些好的资料:
http://blog.csdn.net/sharkw/article/details/1904302
http://blog.sina.com.cn/s/blog_4b5039210100ie6a.html