gnuplot - how to obtain contour lines with the same level color of the 3d plot -


i have 3-dimensional plot obtained gnuplot, calculate contour lines as:

set pm3d @ s

set palette rgbformulae 33,13,10

set contour

unset clabel

set cntrparam levels incremental 1,1,5

sp "dati.dat" u 1:2:3 w l ls 7 notitle

i'd plot contour lines same colour specified in corresponding level in 3d plot. didn't find helpful post. possible in way?

you have include palette command in sp command:

set pm3d @ s set palette rgbformulae 33,13,10 set contour unset clabel set cntrparam levels incremental -100,10,100  sp x*y w l ls 7 palette notitle 

the palette option apply definition line 2 contour-lines, , plot:

surface , contour lines

note: contour levels changed -100,10,100 accomodate function x*y chose plot due lack of suitable input file.


if want keep black grid on surface, suggest using multiplot , plotting grid on top of surface. updated code:

set pm3d @ s set palette rgbformulae 33,13,10 set contour unset clabel set cntrparam levels incremental -100,10,100  set multiplot  sp x*y w l ls 7 palette notitle  unset contour  sp x*y w l ls 7 notitle  unset multiplot 

it important unset contour between 2 plot commands. way, grid second sp command (and no palette option there, either).

and now, example looks this:

surface, contour lines , black grid


if attempt manually rotate figure generate multiplot-command, loose contour-lines (because plotted first), explained in this answer. if default orientation not suit needs, use set view before calling multiplot.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -