python 生成 数据,gnuplot/pylab 画图, 嵌入到latex。 这里:python 调用 gnuplot 画图,set output 到 png or latex.
首先,安装数值计算包 numpy, scipy
首先,安装数值计算包 numpy, scipy
1. NumPy 1.04 : numpy is a new version of numarray. numpy,已替代Numeric.
http://numpy.scipy.orgsudo apt-get install python-numpy
import numpy
2. SciPy library depends on NumPy
install scipy: (only for optimized package using LPAS, since numpy contains it.)
www.scipy.org
然后,安装 gnuplot 或者 pylab
安装PyLab: plotting with the pylab module from matplotlib, depending on numpy. free from: http://matplotlib.sourceforge.net/
install:
sudo apt-get install python-matplotlib
import math
import pylab # a new name of matplotlib
安装python-gnuplot module
(by Michael haggerty http://gnuplot-py.sourceforge.net/)sudo apt-get install python-gnuplot
参考书 python scripting for computational science.pdf
没有评论:
发表评论