Download the latest plplot release source: http://sourceforge.net/projects/plplot/files/plplot/
E.g. http://sourceforge.net/projects/plplot/files/plplot/5.9.5%20Source/plplot-5.9.5.tar.gz/download

Untar the plplot package:
tar -xzf plplot-x.y.z.tgz

Use cmake to install PLplot. This step will generate (among other things) usable headers that we will copy in QSAS.
cd plplot-x.y.z
mkdir build_dir
cd build_dir
cmake -DDEFAULT_NO_DEVICES=ON -DCMAKE_INSTALL_PREFIX=/Applications/plplot -DCMAKE_VERBOSE_MAKEFILE=ON ../
make 
make install

Copy the following from plplot-x.y.z (source folder) to QSAS/src/Utilities/qplplot/ using...

cp src/mt19937ar.c src/mt19937ar.h src/pdfutils.c src/plargs.c src/plbox.c src/plbuf.c src/plcont.c src/plcore.c src/plctrl.c src/plcvt.c src/pldeprecated.c src/pldtik.c src/plfill.c src/plfreetype.c src/plgridd.c src/plhist.c src/plimage.c src/plline.c src/plmap.c src/plot3d.c src/plpage.c src/plsdef.c src/plshade.c src/plstdio.c src/plstripc.c src/plsym.c src/pltick.c src/pltime.c src/plvect.c src/plvpor.c lib/csa/csa.c lib/csa/csadll.h lib/csa/csa.h lib/csa/nan.h lib/qsastime/qsastime.c lib/qsastime/qsastimedll.h lib/qsastime/qsastime_extra.c lib/qsastime/qsastime_extra.h lib/qsastime/qsastime.h build_dir/lib/qsastime/qsastimeP.h build_dir/lib/qsastime/tai-utc.h /Applications/QSAS_2_4/QSAS_dist/src/Utilities/qplplot

cp /Applications/plplot/include/plplot/* /Applications/QSAS_2_4/QSAS_dist/src/Utilities/qplplot
some headers may be missing from here.

In /Applications/QSAS_2_4/QSAS_dist/src/Utilities/qplplot/:

Edit plConfig.h:
comment out #define ENABLE_DYNDRIVERS  ???? gone?

add:
#ifndef BUILD_DIR
#define BUILD_DIR getenv("QSAS_HOME")
#endif
#define VERSION_ "5.96"
// #define PL_HAVE_SNPRINTF 0 ?not needed any more ?
#define PL_DEFAULT_CMAP0_FILE "cmap0_default.pal"
#define PL_DEFAULT_CMAP1_FILE "cmap1_default.pal"
#define SOURCE_DIR ""
#define  PL_HAVE_MKSTEMP 1

Edit plgridd.c:

Change paths in includes:
#ifdef WITH_CSA
#include "csa.h"
#endif
#include "nan.h" /* this is handy */

edit plargs.c, plcore.c:
change "VERSION" for "VERSION_", to avoid conflicting macros

edit plDevs.h:
add #define PLD_qt

edit drivers.h:
add PLDLLIMPEXP_DRIVER void plD_dispatch_init_qt  ( PLDispatchTable *pdt );

edit plstrm.h:
add in PLStream structure:

Fixes to Hershet Codes from SJS.

As before, the fix involves changing entries in plhershey-unicode.h:

Hershey numbers    plplot5.9.7 unicode      change to this
46, 546                  0x03d2                  0x03a5     Upsilon
634                      0x03d1                  0x03b8     theta
98, 684, 2184            0x03f5                  0x03b5     epsilon
686, 2186                0x03d5                  0x03c6     phi variant


850			 0x2219			 0x2022	    bullet

Note - You can use the gucharmap application to see all the unicode symbols,
and a whole lot more.
