how to tell gnuplot version and other things from a script

View: New views
1 Messages — Rating Filter:   Alert me  

how to tell gnuplot version and other things from a script

by Mark Seger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have a script that uses gnuplot to do its plotting and needs to be
able to run with different versions.  It runs primarily in a linux
environment but occasionally on windows too.  In the case of windows I
have not been able to figure out the gnuplot version but on linux
discovered I could:

echo show version | gnuplot

and parse the output.  But I just tried this with gnuplot V4.2 and
discovered that while it works, I get a warning that it can't open the X
display and this causes my script to hang for a long time and is not the
behavior on earlier versions and doesn't seem to make sense anyway since
not everyone runs gnuplot on X terminals.

The second thing I'm trying to do is determine the size font a png
terminal will use and I found I could do this with:

(echo set terminal png; echo show terminal) | gnuplot

but again I get that X11 warning.

Finally, even if my terminal type is X, if I run the commands from a
script they hang for awhile but work fine on earlier versions.

That said, my question(s) come down to:
- what is the best/most efficient way to get the gnuplot versions and
png font sizes from a script?
- less important but still something that would be nice is to have a way
to do this in a windows environment.

-mark

 

 



------------------------------------------------------------------------------
_______________________________________________
Gnuplot-info mailing list
Gnuplot-info@...
https://lists.sourceforge.net/lists/listinfo/gnuplot-info