bedwere
bedwere

Reputation: 41

gnuplot contour stops before reaching border

I have a file with a field (vr-cs) defined between -0 and 30 in x and -30 to 30 in y. You can download the file from here. I'm trying to plot a contour of vr-cs=0 between [0:8][0:3]

set view map
set contour
set cntrparam levels discrete 0
splot [0:8][0:3] "vr-cs101.gnu" w l nosurface notitle

This gives me:

contour of vr-cs=0

As you can see, there is a gap between the contour and the y=0 axis.

Yet, if I do

splot [0:8][-3:3] "vr-cs101.gnu" w l nosurface notitle

I get:

contour of vr-cs=0, extending from -3 to 3 in y

Now the contour continues all the way through the y=0 axis. Is there a way to have a plot only of the [0:8][0:3] area but with the contour reaching the y=0? Thank you!

Upvotes: 0

Views: 22

Answers (1)

Ethan
Ethan

Reputation: 15118

I think that artifact is caused by a long-standing bug that was fixed a while ago. It is not present in the current gnuplot stable (6.0.2) or development (6.1) versions. In gnuplot 6.0.2 output

Here is a work-around to use with older versions of gnuplot.

set view map
set contour
set cntrparam levels discrete 0
set table $CONTOURS
splot [0:8][-3:3] "contourbug.dat" w l nosurface notitle
unset table

unset contour
splot [0:8][0:3] $CONTOURS with lines nosurface

work-around

Upvotes: 0

Related Questions