> Hello.
>
>  I seem to be having a hard time finding basic information about getting
>  PGPLOT or aquaterm to work on OS X.
>
>  If someone would PLEASE care to educate me about PGPLOT, I would be 
> most
>  grateful; reading the documentation is one thing but understanding how
>  to get it to actually work and compile (with my limited knowledge about
>  compilation) is another matter.
>
>  Could anyone give me a tiny step by step lesson to make the simplest
>  program work?
>
>  Thanks in advance.
>
>  Paul

OK, lets see...

[the following assumes a fink-installed pgplot]

PGPLOT is a library of FORTRAN (libpgplot) routines that you can call 
from your code to bring up graphs of your data, i.e. pgplot is not a 
program in itself. There is also a C wrapper library called libcpgplot. 
That said, this is probably the simplest c-program that does something 
useful (in a file named 'caqtdemo.c'):
// ----- begin caqtdemo.c ---
#include "cpgplot.h"
#include <stdio.h>

int main(void)
{
        if (cpgopen("1/AQT"))
     {
                cpgpage();
                cpgsvp(0.1, 0.9, 0.1, 0.9);
                cpgswin(0.0,1.0,0.0,1.0);
                cpgbox("BCGNTS",0.1,5,"BCGNTS",0.1,5);
                cpglab("x-label","y-label","title");
                cpgclos();
        }
        else
        {
                printf("Could not open AQT, exiting\n");
        }
        return 0;
}
// ----- end caqtdemo.c ---

to compile it, use (on a singe line of input)

cc -g -I/sw/lib/pgplot -L/sw/lib -L/sw/lib/pgplot -L/usr/X11R6/lib -o 
caqtdemo caqtdemo.c -lcpgplot -lpgplot -lpng -lX11 -lg2c -framework Cocoa

then issue ./caqtdemo to run it

Main source of information on pgplot routines.
http://www.astro.caltech.edu/~tjp/pgplot/chapter1.html

also, look around in the source directory (especially in cpg/ for C 
info). Type gnutar xvzf /sw/src/pgplot5.2.tar.gz to unpack the sources 
if you haven't done it already.

HTH,
Per


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

_______________________________________________
Fink-beginners mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-beginners

Reply via email to