Here you can follow the steps to install pgplot on you linux OS.
First, you need to be sure you have X11 lib development packages installed, and then just follow the steps copied as below:
su cd /usr/local/src wget ftp://ftp.astro.caltech.edu/pub/pgplot/pgplot5.2.tar.gz tar -zxvf pgplot5.2.tar.gz cd pgplot mkdir /usr/local/pgplot cd !$ cp /usr/local/src/pgplot/drivers.list .
then use vim to edit drivers.list in the directory, choose the PSDRIV 1,2,3,4 for EPS figures and XWDRIV 1,2 for X-window output. And then
/usr/local/src/pgplot/makemake /usr/local/src/pgplot linux g77_gcc ln -s /usr/bin/g77-3.3 /usr/bin/g77 #(if you have g77 you can skip this, #or if you have g77-**, please use g77-** instead of g77-3.3) make make cpg
And then replace the first line of /usr/local/src/pgplot/makehtml with #!/usr/bin/perl, run
make pgplot.html make clean cd /usr/local/lib ln -s /usr/local/pgplot/libpgplot.a libpgplot.a ln -s /usr/local/pgplot/libcpgplot.a libcpgplot.a cp /usr/local/pgplot/libpgplot.so . /sbin/ldconfig -v ln -s /usr/local/pgplot/cpgplot.h /usr/local/include/cpgplot.h
Then, setup the environment variables. If you want to use bash, just edit /etc/bash.basrc file, adding
PGPLOT_DIR=/usr/local/pgplot/ export PGPLOT_DIR PGPLOT_DEV=/xwin export PGPLOT_DEV into it. If you want to use tcsh/csh, you need to edit /etc/csh.cshrc file by adding
setenv PGPLOT_DIR /usr/local/pgplot/ setenv PGPLOT_DEV /xwin
into it. Then re-login your bash/csh/tcsh and go to the /usr/local/pgplot directory and run demo to check whether you successfully installed pgplot as
cd /usr/local/pgplot ./pgdemo1
All the steps are taken form: http://www.lorene.obspm.fr/pgplot_quick.txt with some little variation by myself. And this is a part of LensTools intallation, and the most difficult part of it.
作图软件?跟gnuplot类似的?
应该是吧,具体我没用过,所以也不清楚。因为这个是在装Lenstool的依赖包,所以才装的它。貌似很多天文包都对它有依赖。
好就只好回来看,才知道原来真的很多都要pgplot来生成可视化结果。
是啊。