Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

column(-2): "x range is invalid"

698 views
Skip to first unread message

Peter Jansson

unread,
Nov 7, 2001, 11:48:56 AM11/7/01
to
Dear gnuplotters,

I am using version 3.8g patchlevel 0 on a unix system. I have a data
file called 'datafile.dat' with two blocks of data, i.e. the index
number goes from 0 to 1, each block contains five columns of data. I
would like to plot this data using the following commands:

a=12.34
b=43.21
f(index)=((index==1)?(a/b):1.0)
plot 'datafile.dat' using
($1):(($3)*($5)*f(column(-2))):($2):(($4)*($5)) notitle with xyerrorbars

However, gnuplot complains that the x range for column(x) is invalid.
Can't I use column(-2) as I have done above? Column(-2) should be the
index number according to the help: "help plot using". Any suggestions?
(I noticed that Christian Zobel <zo...@ph2.uni-koeln.de> posted a
question about this back in 1997-04-12 without any answers...)

Best regards,
Peter Jansson
http://jansson.net/


Hans-Bernhard Broeker

unread,
Nov 7, 2001, 1:38:56 PM11/7/01
to
Peter Jansson <webm...@jansson.net> wrote:
[...]

> However, gnuplot complains that the x range for column(x) is invalid.

It's not exactly the "x range for column(x)" --- it's really the x
range. And it's invalid because column(-2) is completely
unimplemented. It always flags "undefined value" and returns no
useful information, assuming you had passed an invalid column number.

I'll fix that in a minute...
--
Hans-Bernhard Broeker (bro...@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

0 new messages