« Return to Thread: Re: how to tell gnuplot version and other things from a script
Mark Seger wrote:The 'save filename' trick does not work on windows, at least not with v4.2. All it does is run gnuplot. I don't plan to lose too much sleep over this one, but rather was just wondering if there are any tricks I might have missed.
-mark
>-----Original Message-----
>From: Thomas Sefzick [mailto:t.sefzick@fz-juelich.de]
>Sent: Friday, July 03, 2009 2:24 PM
>To: gnuplot-info@lists.sourceforge.net
>Subject: Re: [Gnuplot-info] how to tell gnuplot version and other things
>from a script
>
>
>version strings are written to stderr (except for 'gnuplot -V'),
>that's one of the problems.
>
>something that should work on all platforms and versions:
>echo save \"filename\" | gnuplot
>and then read the file in and parse it.
>
>
>Mark Seger wrote:
>>
>> I guess my problem is I started with 3.7 and those commands definitely
>do
>> NOT work:
>>
>> [root@cag-dl585-02 gnuplot-3.7.3]# gnuplot -v
>> Cannot open load file '-v'
>> line 0: (No such file or directory)
>>
>> [root@cag-dl585-02 gnuplot-3.7.3]# gnuplot -V
>> Cannot open load file '-V'
>> line 0: (No such file or directory)
>>
>> [root@cag-dl585-02 gnuplot-3.7.3]# gnuplot --version
>> Cannot open load file '--version'
>> line 0: (No such file or directory)
>>
>> while the following does:
>>
>> [root@cag-dl585-02 gnuplot-3.7.3]# echo show version | gnuplot
>>
>> G N U P L O T
>> Version 3.7 patchlevel 3
>> last modified Thu Dec 12 13:00:00 GMT 2002
>> System: Linux 2.6.18-92.el5
>>
>> I also tried those commands on a windows platform with 4.2 and they
>don't
>> work there either. I don't get an error message and I see something
>> flicker as if it tried to start and then exited, but no terminal
>output:
>>
>> C:\Users\mjs>\bin\gnuplot\bin\wgnuplot.exe -V
>>
>> C:\Users\mjs>
>>
>> As I said, I'm looking for something that works on all versions, at
>least
>> since 3.7
>>
>> -mark
>>
>>
>>
>>>-----Original Message-----
>>>From: Thomas Sefzick [mailto:t.sefzick@fz-juelich.de]
>>>Sent: Friday, July 03, 2009 11:04 AM
>>>To: gnuplot-info@lists.sourceforge.net
>>>Subject: Re: [Gnuplot-info] how to tell gnuplot version and other
>things
>>>from a script
>>>
>>>
>>>should work on all platforms:
>>>gnuplot --version
>>>gnuplot -V
>>>
>>>
>>>Mark Seger wrote:
>>>>
>>>> I've been playing around a little more with different versions and
>it
>>>> looks like this problem is with 4.2.0 but 4.2.1 forward seems to be
>>>ok.
>>>> However I am still interested in finding out if there is a way to
>tell
>>>> tell a gnuplot version from a script on a windows platform.
>>>> -mark
>>>>
>>>>>-----Original Message-----
>>>>>From: Seger, Mark
>>>>>Sent: Friday, July 03, 2009 8:33 AM
>>>>>To: gnuplot-info@lists.sourceforge.net
>>>>>Subject: how to tell gnuplot version and other things from a script
>>>>>
>>>>>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@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>>>>
>>>>
>>>
>>>--
>>>View this message in context: http://www.nabble.com/Re%3A-how-to-tell-
>>>gnuplot-version-and-other-things-from-a-script-
>tp24324088p24324596.html
>>>Sent from the Gnuplot - User mailing list archive at Nabble.com.
>>>
>>>
>>>----------------------------------------------------------------------
>--
>>>------
>>>_______________________________________________
>>>Gnuplot-info mailing list
>>>Gnuplot-info@lists.sourceforge.net
>>>https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>>
>> ----------------------------------------------------------------------
>--------
>> _______________________________________________
>> Gnuplot-info mailing list
>> Gnuplot-info@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>>
>>
>
>--
>View this message in context: http://www.nabble.com/Re%3A-how-to-tell-
>gnuplot-version-and-other-things-from-a-script-tp24324088p24327012.html
>Sent from the Gnuplot - User mailing list archive at Nabble.com.
>
>
>------------------------------------------------------------------------
>------
>_______________________________________________
>Gnuplot-info mailing list
>Gnuplot-info@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gnuplot-info
------------------------------------------------------------------------------
_______________________________________________
Gnuplot-info mailing list
Gnuplot-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuplot-info
« Return to Thread: Re: how to tell gnuplot version and other things from a script
| Free embeddable forum powered by Nabble | Forum Help |