|
From: Jonathan T. <jt...@as...> - 2014-03-07 20:50:47
|
On Tue, Mar 04, 2014 at 08:51:32PM -0800, sfeam wrote:
> This is a reminder that a first release candidate for gnuplot version 5
> is planned for later this year. In preparation for that I will bump the
> version information in the current development source tree to 5.0.alpha.
[[...]]
>
> Important note: If there is some behaviour or syntax in gnuplot
> that has been annoying you for the last 20 years, please speak up.
> This is the best chance you will have to get it changed!
Ok, here's my candidate for #1 gnuplot annoyance:
Suppose I have a gnuplot script which sets up a bunch of functions,
computes some stuff, and eventually does a plot. For nontrivial plots
this means that I have many continuation lines ("backslash at the end
of the line") in the 'plot' command. The problem is, if I have a
syntax error anywhere in the plot command, the error will be reported
with the line number of the *last* continuation line.
For example, what happens if I put an extra comma into this plot command:
plot sigmoid(A,B,C,D, P) \
title 'sigmoid fit' \
with lines linetype 1 linecolor -1, \
\
0.327 \
title 'Zero OD 0.327 & 0.309' \
axis x1y2 \
with lines linetype 2 linecolor 3, \
0.309 \
notitle \
axis x1y2 \
with lines linetype 2 linecolor 3, \
\
range20 \
title '20% & 80% yrange of sigmoid' \
axis x1y1 \
with lines linetype 1 linecolor 4, \
range80 \
notitle \
axis x1y1 \
with lines linetype 1 linecolor 4, \
\
range10 \
title '10% & 90% yrange of sigmoid' \
axis x1y1 \
with lines linetype 1 linecolor 5, \
range90 \
notitle \
axis x1y1 \
with lines linetype 1 linecolor 5, \
\
\
'plate-G25-standards.dat' \
title 'standards' \
axis x1y2 \
with points pointtype 7 pointsize 0.5 linecolor -1,, \
\
'plate-G25-QC-high.dat' \
title 'QC high (100)' \
axis x1y2 \
with points pointtype 1 pointsize 0.750 linecolor rgb "#00A000",\
\
'plate-G25-QC-low.dat' \
title 'QC low (12.5)' \
axis x1y2 \
with points pointtype 1 pointsize 0.750 linecolor 1
I get an echoed line (which is several screenfills line-wrapped),
with an "^" cursor which I can't interpret (because the "line" in
question is many physical lines wrapped together with line continuation),
followed by
^
"bad.gnuplot", line 159: invalid expression
where line 159 is the last of the continuation lines.
It would be wonderful if error reports could refer to the actual physical
line of the error instead. (I realise this might be messy to implement
if we've already processed the line continuations before the error is
found.)
ciao,
--
-- "Jonathan Thornburg [remove -animal to reply]" <jt...@as...>
Dept of Astronomy & IUCSS, Indiana University, Bloomington, Indiana, USA
"There was of course no way of knowing whether you were being watched
at any given moment. How often, or on what system, the Thought Police
plugged in on any individual wire was guesswork. It was even conceivable
that they watched everybody all the time." -- George Orwell, "1984"
|