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

Plotting upper/lower limits

937 views
Skip to first unread message

Peter Weilbacher

unread,
Jul 11, 2002, 10:07:19 PM7/11/02
to
Hi all,

I would like to plot some datapoints of which I only have upper limits,
so that I get a point or cross and from that something like an errorbar
with an arrow at the end pointing down, while from left to right I have
normal errorbars.
This will be even more complicated, because I have to show the data
also in transformation, so that I have lower limits or "right limits" in
some plots.

The version I currently run is "Version 3.8h patchlevel 0". There I
didn't find anything like that in the gnuplot help pages. Does that mean
I am too tired or does it mean that I really have to "draw that by hand"?
--
Gruß,
Peter.

Hans-Bernhard Broeker

unread,
Jul 12, 2002, 4:09:19 AM7/12/02
to
Peter Weilbacher <pwe...@gwdg.de> wrote:
[...]

> The version I currently run is "Version 3.8h patchlevel 0". There I
> didn't find anything like that in the gnuplot help pages. Does that mean
> I am too tired or does it mean that I really have to "draw that by hand"?

Draw it by hand is what you'll have to do, I think.
--
Hans-Bernhard Broeker (bro...@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

Theo Hopman

unread,
Jul 12, 2002, 10:24:34 AM7/12/02
to
On Fri, 12 Jul 2002 04:07:19 +0200, Peter Weilbacher scribbled:
: Hi all,

If I understand you correctly, you want something like the following
(view in a monospaced font, of course):
_
|
|
|--*---|
|
|
V <---- this lower limit I assume to be an estimate based on the
known upper limit

It should be possible to do something with a combination of the
xyerrorbar and vector plotting styles, and the conditional operator. The
following works in gnuplot 3.8g pl0:

plot 'test.dat' using 1:2:3:4:5:6 with xyerrorbars,\
'' using 1:(valid(5) ? 0/0 : $2):3:4:2:6 with xyerrorbars,\
'' using 1:(valid(5) ? 0/0 : $2):(0):($1-$6) with vector

on the following data:

#x y xlow xhigh ylow yhigh
1 1 0.9 1.2 ? 1.3
2 2 1.9 2.2 1.8 2.3

The first data point has a missing y lower limit, and is therefore
ignored by the first line of the plot command. The second line tests
whether the y lower limit in column 5 is valid, and plots only those data
points and error bars where the lower limit is missing. The third line
also tests the y lower limit in column 5, but draws an arrow to simulate
the error bar. You may have to change the 'using' entries to match the
format of your data file.

THeo

Peter Weilbacher

unread,
Jul 12, 2002, 11:50:46 AM7/12/02
to
On Fri, 12 Jul 2002 16:24:34 +0200, Theo Hopman wrote:

> plot 'test.dat' using 1:2:3:4:5:6 with xyerrorbars,\
> '' using 1:(valid(5) ? 0/0 : $2):3:4:2:6 with xyerrorbars,\
> '' using 1:(valid(5) ? 0/0 : $2):(0):($1-$6) with vector

Yes, thanks! That seems to work. If I add 2/1/1 to the ends of the
lines I even get the same colors. I had never seen the vector style
before...
--
Gruß,
Peter.

0 new messages