Question

I am trying to draw all contours lines in a same color following the example from here: http://gnuplot.sourceforge.net/demo/contours.25.gnu

enter image description here

However, the example works, but my own code does not work:

set xyplane 0;
set pm3d
set contour
set cntrparam levels 6
unset surface;
unset key;
set pm3d map
set title "t";
splot for [i=1:1] "-" using 1:2:3 notitle with lines lc rgb "dark-blue";
....data....

enter image description here

Can you help me find the problem?

Here to download the code file:

https://dl.dropboxusercontent.com/u/45318932/contourpm3d.plt

I am using gnuplot4.6.5

Was it helpful?

Solution

The relevant line is

unset clabel

I know, that is very unintuitive. Don't know the reason behind it.

Here is the complete script with the respective changes, for reference:

set xyplane 0;
set pm3d
set contour
unset clabel
set cntrparam levels 6
unset surface;
unset key;
set pm3d map
splot for [i=1:1] "-" using 1:2:3 notitle with lines lw 2 lc rgb "dark-blue";
#a1 a2 t
0.0 0.0 25.0
0.0 0.1 28.0
0.0 0.2 37.0
0.0 0.3 23.0
0.0 0.4 23.0
0.0 0.5 15.0
0.0 0.6 16.0
0.0 0.7 33.0
0.0 0.8 16.0
0.0 0.9 20.0
0.0 1.0 14.0

0.1 0.0 25.0
0.1 0.1 47.0
0.1 0.2 26.0
0.1 0.3 14.0
0.1 0.4 16.0
0.1 0.5 15.0
0.1 0.6 27.0
0.1 0.7 13.0
0.1 0.8 14.0
0.1 0.9 20.0
0.1 1.0 0.0

0.2 0.0 25.0
0.2 0.1 28.0
0.2 0.2 26.0
0.2 0.3 14.0
0.2 0.4 16.0
0.2 0.5 16.0
0.2 0.6 32.0
0.2 0.7 14.0
0.2 0.8 19.0
0.2 0.9 0.0
0.2 1.0 0.0

0.3 0.0 57.0
0.3 0.1 36.0
0.3 0.2 26.0
0.3 0.3 14.0
0.3 0.4 15.0
0.3 0.5 16.0
0.3 0.6 31.0
0.3 0.7 18.0
0.3 0.8 0.0
0.3 0.9 0.0
0.3 1.0 0.0

0.4 0.0 42.0
0.4 0.1 23.0
0.4 0.2 26.0
0.4 0.3 19.0
0.4 0.4 15.0
0.4 0.5 16.0
0.4 0.6 34.0
0.4 0.7 0.0
0.4 0.8 0.0
0.4 0.9 0.0
0.4 1.0 0.0

0.5 0.0 54.0
0.5 0.1 23.0
0.5 0.2 26.0
0.5 0.3 17.0
0.5 0.4 15.0
0.5 0.5 16.0
0.5 0.6 0.0
0.5 0.7 0.0
0.5 0.8 0.0
0.5 0.9 0.0
0.5 1.0 0.0

0.6 0.0 21.0
0.6 0.1 23.0
0.6 0.2 23.0
0.6 0.3 16.0
0.6 0.4 16.0
0.6 0.5 0.0
0.6 0.6 0.0
0.6 0.7 0.0
0.6 0.8 0.0
0.6 0.9 0.0
0.6 1.0 0.0

0.7 0.0 21.0
0.7 0.1 16.0
0.7 0.2 27.0
0.7 0.3 12.0
0.7 0.4 0.0
0.7 0.5 0.0
0.7 0.6 0.0
0.7 0.7 0.0
0.7 0.8 0.0
0.7 0.9 0.0
0.7 1.0 0.0

0.8 0.0 61.0
0.8 0.1 27.0
0.8 0.2 33.0
0.8 0.3 0.0
0.8 0.4 0.0
0.8 0.5 0.0
0.8 0.6 0.0
0.8 0.7 0.0
0.8 0.8 0.0
0.8 0.9 0.0
0.8 1.0 0.0

0.9 0.0 27.0
0.9 0.1 21.0
0.9 0.2 0.0
0.9 0.3 0.0
0.9 0.4 0.0
0.9 0.5 0.0
0.9 0.6 0.0
0.9 0.7 0.0
0.9 0.8 0.0
0.9 0.9 0.0
0.9 1.0 0.0

1.0 0.0 35.0
1.0 0.1 0.0
1.0 0.2 0.0
1.0 0.3 0.0
1.0 0.4 0.0
1.0 0.5 0.0
1.0 0.6 0.0
1.0 0.7 0.0
1.0 0.8 0.0
1.0 0.9 0.0
1.0 1.0 0.0
e

with the output

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top