The official plplot documentation is at http://plplot.sourceforge.net/docbook-manual/plplot-html-5.9.9/
#include <cpgplot.h> | #include <plplot/plplot.h>; |
cpgbeg(0,“/xs”,1,3) | plstart(“xwin”, 1,3) |
cpgend() | plend(); |
cpgask(0); | plspause(0); |
cpgbbuf(); | None? |
cpgenv(0,nchan,min,max,0,0); | plenv(0,nchan,min,max,0,0); |
cpgpage(); | pladv(); |
cpgvstd(); | plvsta(); |
cpgswin(X1, X2, Y1, Y2); | plwind(xmin , xmax , ymin , ymax); |
cpgbox(“BCNST”, 0.0, 0, “BCNSTL”, 0.0, 0); | plbox(“bcnst”, 0.0, 0, “bcnstl”, 0.0, 0); |
ppglab(“Channel”, “Amplitude”, “”); | pllab(“Channel”, “Amplitude”, “”); |
cpgeras(); | plclear(); |
cpgpanl(y, y); | pladv(N); |
cpgsci(1); | plcol0(15); |
cpgscr(0,1,1,1); | plscmap0 (r , g , b , ncol0 ); |
cpgsch(1); | plschr(0,0.8); |
cpgline(n, xvals, yvals); | plline(n, xvals, yvals); |
cppgpt(nchan, xval, phase[i], 17); | plsym(nchan, xval, phase[i], 17); |
cpgmtxt(“T”, -1.5, 0.02, 0, sourcename); | plmtex(“t”, -1.5, 0.02, 0, sourcename); |
For Debian Squeeze I installed
> apt-get install libplplot-dev libplplot9 plplot9-driver-cairo plplot9-driver-xwin
brew install plplot
Old notes
You need to have cmake installed - I get cmake from brew - http://mxcl.github.com/homebrew/
Download the source code from sourceforge
svn co https://plplot.svn.sourceforge.net/svnroot/plplot/trunk plplot
To install I had to disable lots of stuff - your mileage may vary…. In the plplot directory:
mkdir build cd build cmake .. -DENABLE_python=OFF -DENABLE_wxwidgets=OFF -DENABLE_tcl=OFF -DENABLE_tk=OFF -DPLD_wxwidgets=OFF make sudo make install
Disabling python was just because it could not locate Python.h - this may be a problem on my Mac
More recently to compile I had to run cmakes as
cmake .. -DENABLE_ada=OFF
I also had to edit the cmake setup as per http://sourceforge.net/p/plplot/plplot/ci/772223c638ecf5dc740c9f3dd7a6883c6d2c83d2/
plplot supports package config. A simple usage is
gcc `pkg-config --cflags --libs plplotd` prog.c -o prog