#!/usr/local/bin/gnuplot -persist # set terminal canvas rounded size 600,400 enhanced fsize 10 lw 1.6 fontscale 1 name "heatmaps_7" jsdir "." # set output 'heatmaps.7.js' set format cb "%4.1f" set view map scale 1 set samples 25, 25 set isosamples 50, 50 set contour base set xyplane relative 0 set cbtics border in scale 0,0 mirror norotate autojustify set title "4D data (3D Heat Map)\nZ is contoured. Independent value is color-mapped" set title offset character 0, 1, 0 font "" textcolor lt -1 norotate set urange [ 5.00000 : 35.0000 ] noreverse nowriteback set vrange [ 5.00000 : 35.0000 ] noreverse nowriteback set xlabel "x" set xlabel offset character 3, 0, 0 font "" textcolor lt -1 norotate set xrange [ * : * ] noreverse writeback set x2range [ * : * ] noreverse writeback set ylabel "y" set ylabel offset character -1, 0, 0 font "" textcolor lt -1 norotate set yrange [ * : * ] noreverse writeback set y2range [ * : * ] noreverse writeback set zlabel "z" set zlabel offset character 2, 0, 0 font "" textcolor lt -1 norotate set zrange [ * : * ] noreverse writeback set cbrange [ * : * ] noreverse writeback set rrange [ * : * ] noreverse writeback set pm3d implicit at s set colorbox user set colorbox vertical origin screen 0.9, 0.2 size screen 0.03, 0.6 front noinvert noborder sinc(x,y) = sin(sqrt((x-20.)**2+(y-20.)**2))/sqrt((x-20.)**2+(y-20.)**2) Z(x,y) = 100. * (sinc(x,y) + 1.5) color(x,y) = 10. * (1.1 + sin((x-20.)/5.)*cos((y-20.)/10.)) ## Last datafile plotted: "++" splot '++' using 1:2:(Z($1,$2)):(color($1,$2)) with pm3d title "4 data columns x/y/z/color"