个人工具
登录
查看“UbuntuHelp:MatPlotLibHowTo”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:MatPlotLibHowTo”的源代码
来自Ubuntu中文
←
UbuntuHelp:MatPlotLibHowTo
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/MatPlotLibHowTo}} {{Languages|UbuntuHelp:MatPlotLibHowTo}} == What is matplotlib == [http://matplotlib.sourceforge.net/ Matplotlib] (AKA Pylab) is a cross platform 2d plotting library for Python. Matplotlib is in the universe repository, package name "python-matplotlib". Here's how I compiled and installed it from source before that was so. == Installing dependencies == Matplotlib works with a variety of GUI toolkits and graphical back ends. I was most interested in the GTK and Tk interface and in the AGG back end. For those, install the pygtk and tk -dev packages and their dependancies (breezy has tcl8.4) <pre><nowiki> sudo apt-get install python-gtk2-dev sudo apt-get install tk8.4-dev tk8.4-doc </nowiki></pre> Read more about the available backends at [http://matplotlib.sourceforge.net/backends.html]. == Installing buildtools == Ubuntu does not ship with make or gcc installed by default, and [http://checkinstall.izto.org/ checkinstall] seemed like a good idea <pre><nowiki> sudo apt-get install build-essential checkinstall </nowiki></pre> Read more about compiling things on Ubuntu at [[UbuntuHelp:CompilingEasyHowTo|CompilingEasyHowTo]]. == Building matplotlib == Get the latest source (matplotlib-0.86.2.tar.gz as of late January 2006) from matplotlib.sf.net, unpack it, build it and install it. <pre><nowiki> tar zxf matplotlib-0.86.2.tar.gz cd matplotlib-0.86.2 python setup.py build sudo checkinstall python setup.py install </nowiki></pre> Type whatever you like in the various package fields when checkinstall asks. If you're going to share the resulting package with others then try to be accurate, particulary in the license field, so as to not give the wrong impression. checkinstall creates a debian package from what "python setup.py install" installed. You can use that package to remove those files from your system using "dpkg -r matplotlib-0.86.2". Here are two ways to see what's in that package (which is now installed, and a copy of which is in the matplotlib-0.86.2 source directory). <pre><nowiki> dpkg -L matplotlib-0.86.2 | less dpkg --contents matplotlib-0.86.2_0.86.2-1_i386.deb | less </nowiki></pre> == Using matplotlib == Copy the sample matplotlibrc file from the `matplotlib-0.86.2` directory to `~/.matplotlib/matplotlibrc` I edited matplotlibrc changing the line <pre><nowiki> numerix : numarray # numpy, Numeric or numarray </nowiki></pre> to <pre><nowiki> numerix : Numeric # numpy, Numeric or numarray </nowiki></pre> since Numeric is already used in other parts of my application. Run some of the examples in `matplotlib-0.86.2/examples` to check that it works. For example <pre><nowiki> python integral_demo.py </nowiki></pre> There is a [http://matplotlib.sourceforge.net/tutorial.html tutorial] on the matplotlib home page and a [http://new.scipy.org/Wiki/Cookbook/Matplotlib cookbook] on the new SciPy wiki. ---- [[category:CategoryDocumentation]] [[category:CategoryCleanup]] [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:MatPlotLibHowTo
。