another question about contour plot. I am using
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 coloured map and over it a contour map. My terminal is
set terminal pngcairo enhanced size 1440,900 crop font "Palatino,27"
and i want to plot 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
so the contour is set up to plot two isolines, both black, one dashed, one solid, one thick, one thin. It plots two solid red lines with equal thickness.
I tried many solutions found here and there on Google.
1) i replace the "set style line ..." with "set linetype ..." and delete the "set style increment user" line. Lines become both black, solid, equal thickness. I can change the color.
2) i tried to add the "set termoption dashed" line. Nothing, dashed never seen.
Where am I wrong?
Many thanks.
Indeed, currently you cannot use arbitrary line types or styles for different contours. Changing the color works, also setting one dash type (the one of the first contours style is used then), but not mixing dashed and solid and changing the linewidth.
In that case you must write the contours to a file, as you did in your first question :)
The different contour levels can later be accessed with the index keyword. But note, that in the first data set you'll have the complete surface, the contours start at 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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With