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

Wierd Arrow Problem in Gnuplot

295 views
Skip to first unread message

Surinder Singh

unread,
Dec 17, 2005, 7:03:03 AM12/17/05
to
Hi,

I am seeing a wierd problem that has had my head spinning. I am seeing
sometimes (not always) the arrow command being drawn in the wrong place. I
want to draw an arrow, and then I find (depending on the xrange, the arrow
showing up at the wrong place). I am perplexed. Here is a minimal example.
If you use this you will find that the arrow shows up at y=0.571 (although
it is not specified so in the Gnuuplot input file there).

I tested this on two Gnuplots: Cygwin and Windows. Version was 4.0.

Thanks for your help.

s

> cat test.gp
set nologscale y
unset title
set data style points
set pointsize 1.8
set grid
set key left
set style arrow 22 nohead
set style arrow 23 nohead lt 0
set style arrow 33 heads size screen 0.02, 17, 90 filled lt 1 lw 2
set style arrow 44 heads size screen 0.04, 90 empty lt 1 lw 2


set xlabel "x"
set ylabel "y"
set autoscale xy
set xrange [0:25]
# set yrange [0.56:0.595]
unset arrow
set xtics auto
set xtics 1
unset title
set arrow from 24.0 , 0.7 to 1.0 , 0.700 head lt 3
# set arrow from 1.0,0.55 to 24.0,0.55 nohead lt 10
# set arrow from 1.0,0.4 to 24.0,0.4 nohead lt 11

set term png
set output "test.png"

plot 'test.txt' u 1:2 t 'Test'
pause mouse 'Click on plot for next plot'


> cat test.txt
x y
01 0.577117025852203
01 0.585135996341705
05 0.574582993984222
05 0.57753199338913
09 0.582728981971741
09 0.581241011619568
13 0.562498986721039
13 0.573239028453827


>uname -all
CYGWIN_NT-5.1 lta0868945 1.5.18(0.132/4/2) 2005-07-02 20:30 i686 unknown
unknown Cygwin

> I tried this on the following Gnuplots versions:

Cygwin Gnuplot:
G N U P L O T
Version 4.0 patchlevel 0
last modified Thu Apr 15 14:44:22 CEST 2004
System: CYGWIN_NT-5.1 1.5.18(0.132/4/2)

Copyright (C) 1986 - 1993, 1998, 2004
Thomas Williams, Colin Kelley and many others

Windows Gnuplot:
G N U P L O T
Version 4.0 patchlevel 0
last modified Thu Apr 15 14:44:22 CEST 2004
System: MS-Windows 32 bit


Hans-Bernhard Broeker

unread,
Dec 17, 2005, 7:19:18 AM12/17/05
to
Surinder Singh <com_yah...@nowhere.com> wrote:

> showing up at the wrong place). I am perplexed. Here is a minimal example.
> If you use this you will find that the arrow shows up at y=0.571 (although
> it is not specified so in the Gnuuplot input file there).

More to the point, that arrow, as specified, would lie completely
outside the plotted diagram, because its y coordinates are 0.7,
whereas the plotted data and the (commented-out) y range end below 0.6.

I.e. you typically shouldn't see this arrow at all. That do you do is a
known bug in the program, which is being worked on.

--
Hans-Bernhard Broeker (bro...@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

Surinder Singh

unread,
Dec 17, 2005, 10:08:59 PM12/17/05
to

"Hans-Bernhard Broeker" <bro...@physik.rwth-aachen.de> wrote in message
news:40ie26F...@news.dfncis.de...

> I.e. you typically shouldn't see this arrow at all. That do you do is a
> known bug in the program, which is being worked on.

Thanks. I was going bonkers trying to figure this out. Can you shed more
light on the bug? When does it appear? What are its symptoms? How to
avoid it? Any workarounds?

Thanks.

s


Hans-Bernhard Broeker

unread,
Dec 19, 2005, 4:50:42 AM12/19/05
to
Surinder Singh <com_yah...@nowhere.com> wrote:

> Thanks. I was going bonkers trying to figure this out. Can you shed more
> light on the bug? When does it appear?

Whenever you have a 'set arrow' with start or end points are outside
the allowed range (x, y, x2, y2, or [0:1], depending on how you
defined th arrow).

> What are its symptoms?

Arrows in the wrong position.

> How to avoid it?

"Don't do that, then." I.e. don't specify arrows outside the plot
ranges.

Or upgrade to the CVS version, which is in the process of getting this
fixed.

0 new messages