User Tools

Site Tools


difx:plplot

PLPlot

The official plplot documentation is at http://plplot.sourceforge.net/docbook-manual/plplot-html-5.9.9/

Converting PGPLOT to PLPLOT

#include <cpgplot.h> #include <plplot/plplot.h>;
cpgbeg(0,“/xs”,1,3) plstart(“xwin”, 1,3);
cpgask(0); plspause(0);
cpgbbuf(); None?
cpgsci(1); plcol0(15);
cpgenv(0,nchan,min,max,0,0); plenv(0,nchan,min,max,0,0);
cpglab(“Channel”, “Amplitude”, “”); pllab(“Channel”, “Amplitude”, “”);
cpgsch(1); plschr(0,0.8);
cpgline(nchan, xval, amp[i]); plline(nchan, xval, amp[i]);
cpgmtxt(“T”, -1.5, 0.02, 0, sourcename); plmtex(“t”, -1.5, 0.02, 0, sourcename);
cppgpt(nchan, xval, phase[i], 17); plsym(nchan, xval, phase[i], 17);

Installation

Debian

For Debian Squeeze I installed

 > apt-get install libplplot-dev libplplot9 plplot9-driver-cairo plplot9-driver-xwin

OSX

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/

Compiling

plplot supports package config. A simple usage is

  gcc `pkg-config --cflags --libs plplotd` prog.c -o prog
difx/plplot.txt · Last modified: 2015/10/21 10:08 (external edit)