|
From: Federico M. <fed...@gm...> - 2013-08-27 11:04:29
|
Thanks. -F On Tue, Aug 27, 2013 at 1:02 PM, Marek W. Gutowski <gu...@if...> wrote: > Aha, now I see the problem clearly. > Gnuplot doesn't recognize the third column as being written in current > timefmt, > as declared for ydata. Instead it understands it as containing seconds > (not necessarily the integer!). Therefore parsing string like "00:00:52" > produces > exactly zero (the tail of this string, i.e. ":00:52" is not interpreted as > it is not a valid > number). Unfortunately, a command like > set yerror time > seems not implemented. Of course, it would be natural to expect the same > format > for ydata and yerror(bars), and, consequently, for xdata and xerror(bars) - > but this > is evidently not the case. Overlooked? Maybe, but It would be a headache > to calculate yerrorbars as a combination of two or more columns, written in > mixed > formats, some of them numeric and others as time. Sooner or later somebody > would try this ... > This is probably why the trick > plot [0:10] "-" u 1:2:($2-$3):($2+$3) with errorbars > doesn't work either. > > All that remains is to reformat your input, either "on the fly" (I don't > know how > but it's possible) or outside gnuplot, to effectively have third column in > numeric > format, more precisely in seconds. > > Marek > > > Federico Maggi wrote: >> >> Marek, Hans, >> >> On Mon, Aug 26, 2013 at 11:15 PM, Hans-Bernhard Bröker >> <HBB...@t-...> wrote: >> >>>> I am using gnuplot 4.4 patchlevel 4 (compied via homebrew) on Mac OS X >>>> 10.7.5 (GCC 4.2.1). >>> >>> >>> Hmmm... if you're compiling your own gnuplot, why would you pick such an >>> outdated version? >> >> >> I've upgraded to 4.6: the remainder of this email refers to tests >> conducted with 4.6 patchlevel 3. >> >> On Mon, Aug 26, 2013 at 8:01 PM, Marek W. Gutowski<gu...@if...> >> wrote: >>> >>> Looks like you error column (3) is not always in correct (time) format. >>> Otherwise the plot is as expected, I don't see anything wrong with it. >> >> >> that was my point: >> >> 1) this script shows *no* errobars, whereas it should: >> >> # code: https://gist.github.com/4dfa75d1eeb7f4e5b54f >> # screenshot: http://screencast.com/t/jUY84naoxltV >> reset >> set timefmt "%H:%M:%S" >> set ydata time >> plot "-" u 1:2:3 w yerrorbars t '' >> 1 00:02:16 00:00:52 >> 2 00:02:14 00:02:00 >> 3 00:02:01 00:00:52 >> 4 00:01:58 00:00:52 >> 5 00:01:45 00:00:52 >> 6 00:01:32 00:01:01 >> 7 00:01:32 00:00:52 >> 8 00:01:22 00:00:52 >> 9 00:01:17 00:00:52 >> >> >> 2) this script shows errobars correctly, as expected: >> >> # code: https://gist.github.com/c15f8ddc754f330acda7 >> # screenshot: http://screencast.com/t/VycQZFvRrlU >> reset >> plot "-" u 1:2:3 w yerrorbars t 'Script 2' >> 1 16 2 >> 2 14 0 >> 3 01 2 >> 4 58 2 >> 5 45 2 >> 6 32 1 >> 7 32 2 >> 8 22 2 >> 9 17 2 >> >> >> 3) this script (correctly) shows the errorbars if these are specified >> as plain integers, whereas it does not shows any errorbars if these >> are specified as time values. Why? >> >> # code: https://gist.github.com/d52c622c19c2103792d4 >> # screenshot: http://screencast.com/t/cPucckjITl >> >> reset >> set timefmt "%H:%M:%S" >> set ydata time >> plot "-" u 1:2:3 w yerrorbars t 'Script 3' >> 1 00:02:16 00:00:52 >> 2 00:02:14 00:02:00 >> 3 00:02:01 2 >> 4 00:01:58 1.1 >> 5 00:01:45 2.3 >> 6 00:01:32 00:01:01 >> 7 00:01:32 1.5 >> 8 00:01:22 2 >> 9 00:01:17 3 >> >>> Why the last character in your plot command is "t"? >> >> >> it's the (empty) title specification. >> >> -F >> >> >> ------------------------------------------------------------------------------ >> Introducing Performance Central, a new site from SourceForge and >> AppDynamics. Performance Central is your source for news, insights, >> analysis and resources for efficient Application Performance Management. >> Visit us today! >> >> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk >> _______________________________________________ >> gnuplot-info mailing list >> gnu...@li... >> https://lists.sourceforge.net/lists/listinfo/gnuplot-info >> > > > -- > Marek W. Gutowski > Institute of Physics PAS, ON-3.2, Al. Lotnikow 32/46 > 02-668 Warszawa, Poland, tel. +48-22-228436601 ext. 3122 > == To talk or not to talk? Yes, talk, plain ASCII please == > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- -Fede |