GNUPLOT 4.6: custom contour lines

another question about contour plot. I use

    G N U P L O T
    Version 4.6 patchlevel 6    last modified September 2014
    Build System: Linux x86_64

      

and I am trying to plot a color map and above it a contour map. My terminal

    set terminal pngcairo enhanced size 1440,900 crop font "Palatino,27"

      

and i want to build this

    set contour surface
    set cntrparam level discrete 0.3,0.067
    set style line 2 lt 1 lc rgb "black" lw 3
    set style line 3 lt 3 lc rgb "black" lw 1
    set style increment user
    splot 'file1' binary w pm3d nocontour,\
          'file2'  binary w l  nosurface

      

therefore, the contour is configured to draw two isolines, both black and one dashed, one solid, one thick, one thin. It depicts two solid red lines of equal thickness.

I tried many solutions found here and there on google.

1) I replace "set style line ..." with "set linetype ..." and remove the line "set style increment user". The lines turn black, solid and the same. I can change the color.

2) I tried to add the line "set termoption pashed". Never seen anything.

Where am I going wrong?

Many thanks.

+3


source to share


1 answer


Indeed, you cannot currently use arbitrary linetypes or styles for different paths. Color change works as well as setting one stroke type (then one of the first outline style is used), but not mixing dashed and solid and changing line width.

In this case, you should write the outlines to a file as in the first question :)



You index

can access other levels of the outline using the keyword . But keep in mind that in the first dataset you will have a full surface, the outlines start with index 1

:

set termoption dashed
set contour surface
set cntrparam level discrete 0.3,0.067
set style line 2 lt 1 lc rgb "black" lw 3
set style line 3 lt 3 lc rgb "black" lw 1

set table 'temp.dat'
splot 'file2' binary 
unset table
unset contour

splot 'file1' binary w pm3d nocontour,\
      for [i=1:2] 'temp.dat' index i with lines ls (i+1)

      

+1


source







All Articles