Back to demo index

gnuplot demo script: pm3d_clip.dem

autogenerated by webify.pl on Wed Aug 21 21:28:35 2024
gnuplot version gnuplot 6.1 last modified 2024-08-21
#
# New in version 6
#	smooth clipping of pm3d surfaces to zrange
#	smooth intersection of pm3d surfaces
#
set border 4095
set bmargin 6
set style fill transparent solid 0.50 border
unset key
unset colorbox
set view 60, 60, 1.1, 0.6
set samples 40, 40
set isosamples 40, 40
set xyplane 0
set pm3d depthorder border linewidth 0.100
set pm3d clip
set pm3d lighting primary 0.5 specular 0.2 spec2 0

set xrange [-1 : 5]
set yrange [-3 : 3]
set zrange [-10 : 10]
set xtics 2 offset 0,-0.5
set ytics 2 offset 0,-0.5
set ztics 5

f(x,y) = x**2 + y**2 * (1 - x)**3

set multiplot layout 1,2 title "Gnuplot 6 pm3d default is smooth clipping against zrange"
set title "set pm3d clip4in (old default)"
set pm3d clip4in

splot f(x,y) with pm3d fc "cyan"

set title "set pm3d clip (Gnuplot 6)"
set pm3d clip

replot
unset multiplot


Click here for minimal script to generate this plot




#
# New in version 6 - smooth intersection of pm3d surfaces
#
set title "Smooth intersection of pm3d surfaces" 

set border -1
set grid x y z vertical
unset key
unset colorbox
set view 57, 25, 1, 1
set samples 13, 13
set isosamples 7, 7
set xyplane 0
set xrange [ 0.0 : 10.0 ]
set yrange [ 0.0 : 10.0 ]
set zrange [ * : * ]
set pm3d depthorder 
set pm3d border lw 0.5

splot (x*x+y*y) with pm3d fc "yellow", 100-(x*x+y*y) with pm3d fc "forest-green"

Click here for minimal script to generate this plot