#!/usr/local/bin/gnuplot -persist # set terminal canvas rounded size 600,400 enhanced fsize 10 lw 1.6 fontscale 1 name "piecewise_3" jsdir "." # set output 'piecewise.3.js' set border 16 front lt black linewidth 1.000 dashtype solid set key at screen 0.5, 0.15 center center vertical Right noreverse enhanced autotitle nobox set style data lines set xyplane at 0 unset xtics unset ytics set title "Piecewise function of one parameter in 3D" set title font ",15" textcolor lt -1 norotate set xrange [ * : * ] noreverse writeback set x2range [ * : * ] noreverse writeback set yrange [ * : * ] noreverse writeback set y2range [ * : * ] noreverse writeback set zrange [ * : * ] noreverse writeback set cbrange [ * : * ] noreverse writeback set rrange [ * : * ] noreverse writeback set colorbox vertical origin screen 0.9, 0.2 size screen 0.05, 0.6 front noinvert bdefault part1(x) = 0.5 + (9.*x-x**3)/ 24. part2(x) = 1.0 + (x-3.0)**3 / 48. save_encoding = "utf8" part1 = "part1: for x < 1 norm(x) ≈ ½ + (9x-x^3) / 24" part2 = "part2: for x > 1 norm(x) ≈ 1 + (x-3)^3 / 48" ## Last datafile plotted: "+" splot [-2:2][-2:2] sample [h=1:5] '+' using (cos(h)):(sin(h)):(h) lw 2, [h=5:10] '+' using (cos(h)):(sin(h)):(h) lw 4, [h=10:15] '+' using (cos(h)):(sin(h)):(h) lw 2