问题
How one could make resulting output of scaling over z axis symmetric over xy plane: zmax = zmin, keeping autoscale on z axis turning on? (GNUplot 5.0)
resulting graph - 3d-polar.png
Is there this possibility in GNUplot or only fixed range of cbrange can be used?
the example that is used for polar heatmap plot:
reset
set terminal pngcairo size 800,800
set output '3d-polar.png'
set lmargin at screen 0.05
set rmargin at screen 0.85
set bmargin at screen 0.1
set tmargin at screen 0.9
set pm3d map
unset key
set multiplot
set parametric
set grid xtics ytics
set angles degree
set autoscale xfix
set autoscale yfix
set autoscale zfix
set palette model RGB defined ( 0"black", 1"white", 2"grey")
splot '_FullWV.dat' u ($2*cos($1)):($2*sin($1)):3
unset multiplot
The _FullWV.dat file is here.
回答1:
You can use stats
to extract min and max of the 3rd column, and define cbrange accordingly.
reset
set terminal pngcairo size 800,800
set output '3d-polar.png'
set lmargin at screen 0.05
set rmargin at screen 0.85
set bmargin at screen 0.1
set tmargin at screen 0.9
set pm3d map
unset key
set multiplot
stats '_FullWV.dat' using 3
max(a,b) = (a>b) ? a : b
Z_MAX = max(-STATS_min, STATS_max)
set parametric
set grid xtics ytics
set angles degree
set autoscale xfix
set autoscale yfix
#set zrange [-Z_MAX : Z_MAX]
set cbrange [-Z_MAX : Z_MAX]
set palette model RGB defined ( 0"black", 1"white", 2"grey")
splot '_FullWV.dat' u ($2*cos($1)):($2*sin($1)):3
unset multiplot
来源:https://stackoverflow.com/questions/40656069/gnuplot-how-to-make-zmin-equal-to-zmax-keeeping-autoscale-on-z-axis