Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Olaf Schultz Newsgroups: comp.graphics.apps.gnuplot Subject: Re: Format change converter to 5.0? Date: Sat, 1 Apr 2017 12:06:54 +0200 Lines: 83 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net E73u6poGXaLGhUplHL2rYA/42hTRSu7qenH857eDtUJ7F7p7/r Cancel-Lock: sha1:LEuP6yN7n2SSPU0EXGR53L/8jUk= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Xref: csiph.com comp.graphics.apps.gnuplot:3603 On 03/31/17 05:14, Karl Ratzsch wrote: > Am 30.03.2017 um 20:44 schrieb Olaf Schultz: >> I have several files from older versions (4.4, 4.6...) which must now >> run also under 5.0... and that (censored) version complains not only >> ones about strange format and does nothing (better than just plot and >> strange results on the screen)... >> Actual: >> >> set timefmt x "%Y-%m" >> >> Is there a script/tool existing which is able to convert the format of >> gnuplot-files to the new version? > > ("censored"?) > > Not to my knowledge. Who would want to spend more time on developing > such a tool than on converting a few old scripts? > > But you can just go and strip the axis specifiers from all "set timefmt" > commands in your scripts, and see what happens. I'll doubt you see any > difference. According to the docs, even version 4.4 never expected any > axis specifier there (it was accepted, though, up to 4.6.6). That's what I have here in a file... (save "...gnu" So gnuplot had wrote this syntax in the past: #!/usr/local/bin/gnuplot -persist # # # G N U P L O T # Version 4.4 patchlevel 3 # last modified March 2011 # System: Linux 2.6.27.48-0.3-pae # # Copyright (C) 1986-1993, 1998, 2004, 2007-2010 # Thomas Williams, Colin Kelley and many others # # gnuplot home: http://www.gnuplot.info # faq, bugs, etc: type "help seeking-assistance" # immediate help: type "help" # plot window: hit 'h' # set terminal wxt 0 # set output unset clip points set clip one unset clip two set bar 1.000000 front set border 31 front linetype -1 linewidth 1.000 set xdata time set ydata set zdata set x2data set y2data set timefmt x "%Y-%m" set timefmt y "%d/%m/%y,%H:%M" set timefmt z "%d/%m/%y,%H:%M" set timefmt x2 "%d/%m/%y,%H:%M" set timefmt y2 "%d/%m/%y,%H:%M" .... My ~/.gnuplot is rather short and does not consists that. O.K. Here it worked for this file just open gnuplet, set timefmt without that x and copy-paste the plot-line... But I have also a lot of other files coming from 4.3.... where not only this lines needs to be converted because just two \042 have to be removed in several lines. And if I go and write an awk-script for that... Should have started in the past with just saving empty plit-files to find the diff with old/new version and what to be removed/changed. Maybe I will do this... Just to state: I like gnuplot, use it frequently since approx. 20 years, at home and in the job... but this tiny but nerving format changes. Seem that I have to do it as on the job (there 4.6.1 is the most actual version;-)... install several versions also at home:-( Olaf