|
From: Andreas B. <abr...@mp...> - 2012-12-13 12:44:51
|
Hi gnuplot-beta members, some time ago we came across a strange behavior of gnuplot, which we suspected to be a bug. After I failed in contacting the gnuplot-bugs mailing list I had a private communication with Hans-Bernhard Bröker (the owner of the gnuplot-bugs mailing list), who told me that it is actually not a bug. But since this behavior can cause wrong plots and lead to really annoying and time consuming debugging sessions, I want to start a discussion about it: When we used "every" in a plot-file, it did not produce the result we expected. "every" seamed to make a difference between the data blocks '24' and '024': "data.dat" ev :::024::024 u 1:3 title '1' w l "data.dat" ev :::24::24 u 1:3 title '2' w l (Since it is no bug, it can be produced with every version.) I am sure, examples can be found, where this behavior causes even worse results. ;-) From the communication with H.B. Bröker I know that this is because gnuplot interprets zero-prefixed numbers as octal. This may be obvious for C-programmers, but not necessary for non C-programmers. (For example in fortran it is quite common to output normal numbers zero-prefixed.) Therefore I want to suggest the introduction of another prefix for octal numbers (see http://en.wikipedia.org/wiki/Octal#In_computers for examples), which is less error-prone. Alternatively, or as a quick fix, it could be warned when zero-prefixed numbers are used. I curious about your opinions. ( Anyway, gnuplot is a very useful tool ;-) Thanks for it. ) Greetings from Cologne Andreas Breslau |