From: Uwe Z. <uw...@kt...> - 2004-06-01 10:56:11
|
Gnuplot 3.8i and 4.0 both crash while plotting a data file using a format specifier on a data file. The data file has 21 comma separated columns where every third column is a text formated date (which I ignore): #101(Time stamp),101(Seconds),101(C),102(Time stamp),102(Seconds),102(C),103(Time stamp),103(Seconds),103(C),104(Time stamp),104(Seconds),104(C),105(Time stamp),105(Seconds),105(C),106(Time stamp),106(Seconds),106(C),107(Time stamp),107(Seconds),107(C) "2003-09-10 12:14:43.748",0.019,+2.448500E+01,"2003-09-10 12:14:43.968",0.239,+1.652400E+01,"2003-09-10 12:14:44.178",0.449,+1.645500E+01,"2003-09-10 12:14:44.387",0.658,+1.638900E+01,"2003-09-10 12:14:44.597",0.868,+1.633000E+01,"2003-09-10 12:14:44.807",1.078,+1.624000E+01,"2003-09-10 12:14:45.616",1.887,+1.617400E+01 "2003-09-10 12:14:46.733",3.004,+2.448600E+01,"2003-09-10 12:14:46.953",3.224,+1.652200E+01,"2003-09-10 12:14:47.162",3.433,+1.645900E+01,"2003-09-10 12:14:47.372",3.643,+1.639300E+01,"2003-09-10 12:14:47.581",3.852,+1.633100E+01,"2003-09-10 12:14:47.791",4.062,+1.623100E+01,"2003-09-10 12:14:48.601",4.872,+1.618800E+01 "2003-09-10 12:14:49.733",6.004,+2.448700E+01,"2003-09-10 12:14:49.953",6.224,+1.651800E+01,"2003-09-10 12:14:50.162",6.433,+1.645300E+01,"2003-09-10 12:14:50.372",6.643,+1.638700E+01,"2003-09-10 12:14:50.582",6.853,+1.632200E+01,"2003-09-10 12:14:50.791",7.062,+1.623400E+01,"2003-09-10 12:14:51.601",7.872,+1.618400E+01 a minimum sample which still works: ------------------------ reset set nologscale y set xrange [-20:20] set autoscale y plot \ '030910alogg.csv' \ every 1:::0::0 \ using ($1<4700? $1/60.0-60.0:1/0):($2) '"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf'\ axes x1y1 \ title 'center temp.' \ with lines linewidth 4 \ ; ------------------------ but adding another column to the format specifier crashes Gnuplot on Win32 (WinXP sp1+updates): ------------------------ reset set nologscale y set xrange [-20:20] set autoscale y plot \ '030910alogg.csv' \ every 1:::0::0 \ using ($1<4700? $1/60.0-60.0:1/0):($2) '"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf'\ axes x1y1 \ title 'center temp.' \ with lines linewidth 4 \ ; ------------------------ ...independently on which pair of columns I select to read. Earlier I was able to plot this same datafile with GnuPlot 3.7x where the column separator could be redefined to be a comma instead of a whitespace... Any ideas? Uwe. |
From: Hans-Bernhard B. <br...@ph...> - 2004-06-01 11:36:09
|
On Tue, 1 Jun 2004, Uwe Zimmermann wrote: [...] > plot \ > '030910alogg.csv' \ > every 1:::0::0 \ > using ($1<4700? $1/60.0-60.0:1/0):($2) \ > '"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf'\ That's 6 %lf specifiers... > but adding another column to the format specifier crashes Gnuplot on > Win32 (WinXP sp1+updates): [...] > "%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf'\ Now it's 8 %lf specifiers, and that's the cause of the problem. None of gnuplot's plot styles uses more than 7 'using' specifiers, so the format string isn't expected to contain more than 7 instances of %lf. You should replace the %lf for those columns you aren't going to actually use by %*lf, which parses a number but then ignores it. So the real bugs are two-fold: this limitation should be documented in 'help using', and exceeding the limit should yield an error message rather than crash gnuplot. I'll see how this can be fixed. > Earlier I was able to plot this same datafile with GnuPlot 3.7x where > the column separator could be redefined to be a comma instead of a > whitespace... You're mixing up versions here, I think. I'm quite positive none of the officially released 3.7x versions had such an option; i.e. yours must have been a modified one. gnuplot 4.0, OTOH, does have this option. See "help separator". -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |
From: Uwe Z. <uw...@kt...> - 2004-06-01 13:12:57
|
Hi Hans-Bernhard, thanks for this incredibly fast reply! Yes I mixed up versions, partly because set datafile separator is not listed in the help, nor in the list of options when you write set on a Gnuplot 4 command line either... See my second message a minute ago, I solved the problem by using the datafile separator again... Uwe. Tuesday, June 1, 2004, 1:35:53 PM, you wrote: HBB> On Tue, 1 Jun 2004, Uwe Zimmermann wrote: HBB> [...] >> plot \ >> '030910alogg.csv' \ >> every 1:::0::0 \ >> using ($1<4700? $1/60.0-60.0:1/0):($2) \ >> '"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf'\ HBB> That's 6 %lf specifiers... >> but adding another column to the format specifier crashes Gnuplot on >> Win32 (WinXP sp1+updates): HBB> [...] >> >> "%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf'\ HBB> Now it's 8 %lf specifiers, and that's the cause of the problem. None of HBB> gnuplot's plot styles uses more than 7 'using' specifiers, so the format HBB> string isn't expected to contain more than 7 instances of %lf. You should HBB> replace the %lf for those columns you aren't going to actually use by HBB> %*lf, which parses a number but then ignores it. HBB> So the real bugs are two-fold: this limitation should be documented in HBB> 'help using', and exceeding the limit should yield an error message rather HBB> than crash gnuplot. I'll see how this can be fixed. >> Earlier I was able to plot this same datafile with GnuPlot 3.7x where >> the column separator could be redefined to be a comma instead of a >> whitespace... HBB> You're mixing up versions here, I think. I'm quite positive none of the HBB> officially released 3.7x versions had such an option; i.e. yours must have HBB> been a modified one. gnuplot 4.0, OTOH, does have this option. See "help HBB> separator". |
From: Hans-Bernhard B. <br...@ph...> - 2004-06-01 13:28:21
|
On Tue, 1 Jun 2004, Uwe Zimmermann wrote: > Hi Hans-Bernhard, > > thanks for this incredibly fast reply! > Yes I mixed up versions, partly because > > set datafile separator > > is not listed in the help, Not listed *where* in "the help"? And why should it have appeared right there? -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |
From: Uwe Z. <uw...@kt...> - 2004-06-01 14:08:37
|
Hello Hans-Bernhard, Tuesday, June 1, 2004, 3:20:42 PM, you wrote: HBB> On Tue, 1 Jun 2004, Uwe Zimmermann wrote: >> Hi Hans-Bernhard, >> >> thanks for this incredibly fast reply! >> Yes I mixed up versions, partly because >> >> set datafile separator >> >> is not listed in the help, HBB> Not listed *where* in "the help"? And why should it have appeared right HBB> there? in the index between "datafile matrix" and "datafile smooth" or between "commands set contour" and "commands set decimalsign". I have to admit upon closer inspection that it _is_ indeed listed between "set datafile missing" and "set date specifiers", I wonder why the index is this much cluttered with similar entries at different positions...? Uwe. |
From: Hans-Bernhard B. <br...@ph...> - 2004-06-01 14:28:09
|
On Tue, 1 Jun 2004, Uwe Zimmermann wrote: > >> set datafile separator > >> > >> is not listed in the help, > > HBB> Not listed *where* in "the help"? And why should it have appeared right > HBB> there? > > > in the index between "datafile matrix" and "datafile smooth" or > between "commands set contour" and "commands set decimalsign". For the record: that's the index of the Win32 wgnuplot.hlp file, right? > I have to admit upon closer inspection that it _is_ indeed listed > between "set datafile missing" and "set date specifiers", I wonder why > the index is this much cluttered with similar entries at different > positions...? I guess this is caused by the gnuplot.doc not containing these nodes in alphabetically sorted order, or by some slight mistake in the structure of node header lines in gnuplot.doc, the file all the various editions of the documentation are generated from. I don't fully understand how the Index of the .hlp is generated from the RTF file, which in turn is generated from gnuplot.doc, so it's hard to see what's wrong there. -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |
From: Uwe Z. <uw...@kt...> - 2004-06-01 18:37:37
|
Hello Hans-Bernhard, Tuesday, June 1, 2004, 4:27:16 PM, you wrote: HBB> On Tue, 1 Jun 2004, Uwe Zimmermann wrote: >> >> set datafile separator >> >> >> >> is not listed in the help, >> >> HBB> Not listed *where* in "the help"? And why should it have appeared right >> HBB> there? >> >> >> in the index between "datafile matrix" and "datafile smooth" or >> between "commands set contour" and "commands set decimalsign". HBB> For the record: that's the index of the Win32 wgnuplot.hlp file, right? Yes, that was the index I was talking about. A while ago I tried to work with Windows help files myself and know how weird these things are... ;-} Thanks a lot! Uwe. |
From: Hans-Bernhard B. <br...@ph...> - 2004-06-01 23:59:41
|
On Tue, 1 Jun 2004, Uwe Zimmermann wrote: > Yes, that was the index I was talking about. A while ago I tried to > work with Windows help files myself and know how weird these things > are... ;-} Now I'm on a Windows box, and it turns out it's listed right there between "set datafile missing" and "set date_specifiers". It's also available just as "separator". In other words, you tried exactly those two out of four possible keywords it might have been indexed under, where it's not. ;-) [And, for the records, gnuplot-bugs@ is not *my* personal mail address, so it kind of misses the point putting my name on it...] -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |
From: Uwe Z. <uw...@kt...> - 2004-06-02 12:15:44
|
Hi Hans-Bernhard, you are right, right and right. Sorry for taking up your time and bandwidth with something which mainly was a common user error... Still, "set datafile separator" is _not_ listed among the functions you get when you simply type "set" on the GnuPlot 4 command line, which was the first thing I tried, long before looking into the documentation. Your name got added to the address line by my email program (TheBat!) by default. Uwe. Wednesday, June 2, 2004, 1:58:58 AM, you wrote: HBB> On Tue, 1 Jun 2004, Uwe Zimmermann wrote: >> Yes, that was the index I was talking about. A while ago I tried to >> work with Windows help files myself and know how weird these things >> are... ;-} HBB> Now I'm on a Windows box, and it turns out it's listed right there between HBB> "set datafile missing" and "set date_specifiers". It's also available HBB> just as "separator". HBB> In other words, you tried exactly those two out of four possible keywords HBB> it might have been indexed under, where it's not. ;-) HBB> [And, for the records, gnuplot-bugs@ is not *my* personal mail address, so HBB> it kind of misses the point putting my name on it...] |
From: Uwe Z. <uw...@kt...> - 2004-06-01 13:08:49
Attachments:
testdata.csv
|
I might have been a bit confuse concerning the set datafile separator "," since it is not mentioned in the index of the Gnuplot 4.0 help file. The example given below works fine now again without giving the format specifier in the using directive but by switching to comma as separator character. It appears that my newsreader treated the data file lines badly, so I attach a sample data file... Uwe. UZ> Gnuplot 3.8i and 4.0 both crash while plotting a data file using a UZ> format specifier on a data file. The data file has 21 comma separated UZ> columns where every third column is a text formated date (which I UZ> ignore): UZ> #101(Time stamp),101(Seconds),101(C),102(Time UZ> a minimum sample which still works: UZ> ------------------------ UZ> reset UZ> set nologscale y UZ> set xrange [-20:20] UZ> set autoscale y UZ> plot \ UZ> '030910alogg.csv' \ UZ> every 1:::0::0 \ UZ> using ($1<4700? $1/60.0-60.0:1/0):($2) UZ> '"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf'\ UZ> axes x1y1 \ UZ> title 'center temp.' \ UZ> with lines linewidth 4 \ UZ> ; UZ> ------------------------ UZ> but adding another column to the format specifier crashes Gnuplot on UZ> Win32 (WinXP sp1+updates): UZ> ------------------------ UZ> reset UZ> set nologscale y UZ> set xrange [-20:20] UZ> set autoscale y UZ> plot \ UZ> '030910alogg.csv' \ UZ> every 1:::0::0 \ UZ> using ($1<4700? $1/60.0-60.0:1/0):($2) UZ> '"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf,"%*[^"]",%lf,%lf'\ UZ> axes x1y1 \ UZ> title 'center temp.' \ UZ> with lines linewidth 4 \ UZ> ; UZ> ------------------------ UZ> ...independently on which pair of columns I select to read. UZ> Earlier I was able to plot this same datafile with GnuPlot 3.7x where UZ> the column separator could be redefined to be a comma instead of a UZ> whitespace... UZ> Any ideas? UZ> Uwe. |