[comp.sys.next] Help : Gnuplot

zazula@uazhe0.physics.arizona.edu (RALPH ZAZULA) (03/04/91)

Can someone help me get Gnuplot2.02 working?  I'm have an '030 cube
with NS 2.0.  I made these changes in the Makefile:

-DGAMMA=gamma -> -DGAMMA=lgamma 
-LIBS=-lm -lplot -> -LIBS=-lm
-TERMFLAGS=-Iterm -DUNIXPLOT -> -Iterm -DPOSTSCRIPT -DEPSON -DKERMIT

The 'make' goes fine but when I run gnuplot and try 'plot sin(x)'
I get 'all points undefined!'.

what went wrong?

Thanks,
Ralph

   |----------------------------------------------------------------------|
   | Ralph Zazula                               "Computer Addict!"        |
   | University of Arizona                 ---  Department of Physics     |
   |   UAZHEP::ZAZULA                            (DecNet/HEPNet)          |
   |   zazula@uazhe0.physics.arizona.edu         (Internet)               |
   |----------------------------------------------------------------------|
   |   "You can twist perceptions, reality won't budge."  - Neil Peart    |
   |----------------------------------------------------------------------|

madler@kanga.caltech.edu (Mark Adler) (03/04/91)

>> Can someone help me get Gnuplot2.02 working?

Yes.

>> The 'make' goes fine but when I run gnuplot and try 'plot sin(x)'
>> I get 'all points undefined!'.  what went wrong?

What went wrong is that the definition of VERYLARGE messes up comparisons.
The other changes you made were exactly correct.  Here's what to do ...

How to get gnuplot2.02 to work:

0. Get it from duke.cs.duke.edu as gnuplot/gnuplot2.02.tar.Z
1. Do "cp makefile.unx makefile".
2. Edit makefile, change "gamma" in line 28 to "lgamma", remove "-lplot"
   from line 34, and remove "-DUNIXPLOT" from line 44.
3. Edit plot.h and change "HUGE" to "1e300" on line 102.

To test, enter these commands:

     set term epsf2
     set output "sinc.eps"
     plot [-20:20] sin(x)/x
     quit

and then open sinc.eps (double-clicking it or using "open sinc.eps"
will tell Preview to show it).

Have fun.

Mark Adler
madler@pooh.caltech.edu

ddj@zardoz.club.cc.cmu.edu (Doug DeJulio) (03/04/91)

In article <1991Mar4.083019.3893@nntp-server.caltech.edu> madler@kanga.caltech.edu (Mark Adler) writes:
>To test, enter these commands:
>
>     set term epsf2
>     set output "sinc.eps"
>     plot [-20:20] sin(x)/x
>     quit
>
>and then open sinc.eps (double-clicking it or using "open sinc.eps"
>will tell Preview to show it).

For a quicker way to see your output that's aesthetically disgusting,
create a file "header.ps" with the following contents:
%%
0 0 550 770 Nonretained window
windowdeviceround
Above 0 currentwindow
orderwindow
%%
Then, when you use gnuplot, set your terminal type to some form of
postscript, and set your output file to "|cat header.ps -|pft".  To
erase in the window you get, simply drag another window over it.  It's
a yucky hack, but it gets the job done.
-- 
Doug DeJulio
ddj@zardoz.club.cc.cmu.edu

zazula@uazhe0.physics.arizona.edu (RALPH ZAZULA) (03/05/91)

In article <1991Mar4.083019.3893@nntp-server.caltech.edu>, madler@kanga.caltech.edu (Mark Adler) writes...
> 
>>> Can someone help me get Gnuplot2.02 working?
> 
>Yes.
> 
>>> The 'make' goes fine but when I run gnuplot and try 'plot sin(x)'
>>> I get 'all points undefined!'.  what went wrong?
> 
>What went wrong is that the definition of VERYLARGE messes up comparisons.
>The other changes you made were exactly correct.  Here's what to do ...
> 
>How to get gnuplot2.02 to work:
> 
>0. Get it from duke.cs.duke.edu as gnuplot/gnuplot2.02.tar.Z
>1. Do "cp makefile.unx makefile".
>2. Edit makefile, change "gamma" in line 28 to "lgamma", remove "-lplot"
>   from line 34, and remove "-DUNIXPLOT" from line 44.
>3. Edit plot.h and change "HUGE" to "1e300" on line 102.
> 
>To test, enter these commands:
> 
>     set term epsf2
>     set output "sinc.eps"
>     plot [-20:20] sin(x)/x
>     quit
> 
>and then open sinc.eps (double-clicking it or using "open sinc.eps"
>will tell Preview to show it).
> 
>Have fun.
> 
>Mark Adler
>madler@pooh.caltech.edu

Nope, that still dosen't work.  I get the same 'all points undefined'
error.  Doug DeJulio says:

"I'm not sure, but I've been having a dialog with one of the gnuplot
support people about it.  It works if compiled under NS 1.0a, it works
if compiled under SunOS3.5 and you use atom(1) to make it a Mach-O
file.  When compiled under NS 2.0, bizarre errors occur.  The most
obvious error I've found is that anytime you input a constant, it's an
"undefined value"."

He sent me a file that was compiled on a Sun and then converted with atom.
It works fine.  It is a patch-level 1.0 version (with no FPU suport).

This will get me along for now but It would be nice to see this problem
solved.   

Thanks Doug! 

Ralph

   |----------------------------------------------------------------------|
   | Ralph Zazula                               "Computer Addict!"        |
   | University of Arizona                 ---  Department of Physics     |
   |   UAZHEP::ZAZULA                            (DecNet/HEPNet)          |
   |   zazula@uazhe0.physics.arizona.edu         (Internet)               |
   |----------------------------------------------------------------------|
   |   "You can twist perceptions, reality won't budge."  - Neil Peart    |
   |----------------------------------------------------------------------|

ddj@zardoz.club.cc.cmu.edu (Doug DeJulio) (03/06/91)

In article <4MAR91191636@uazhe0.physics.arizona.edu> zazula@uazhe0.physics.arizona.edu writes:
>>0. Get it from duke.cs.duke.edu as gnuplot/gnuplot2.02.tar.Z
>>1. Do "cp makefile.unx makefile".
>>2. Edit makefile, change "gamma" in line 28 to "lgamma", remove "-lplot"
>>   from line 34, and remove "-DUNIXPLOT" from line 44.
>>3. Edit plot.h and change "HUGE" to "1e300" on line 102.
>
>Nope, that still dosen't work.  I get the same 'all points undefined'
>error.  Doug DeJulio says:

Fascinating.  The above fix seemed to *work* for me.
-- 
DdJ