gnuplot-如何使zmin等于zmax并在z轴上自动缩放 [英] gnuplot - How to make zmin equal to zmax keeeping autoscale on z axis

查看:126
本文介绍了gnuplot-如何使zmin等于zmax并在z轴上自动缩放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使z轴上缩放的结果输出在xy平面上对称:zmax = zmin,保持z轴上的自动缩放打开? (GNUplot 5.0)

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)

结果图-3d-polar.png

GNUplot中是否存在这种可能性,或者只能使用固定范围的cbrange?

Is there this possibility in GNUplot or only fixed range of cbrange can be used?

用于极热图的示例:

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

_FullWV.dat文件位于此处.

The _FullWV.dat file is here.

推荐答案

您可以使用stats提取第三列的最小值和最大值,并相应地定义cbrange.

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

这篇关于gnuplot-如何使zmin等于zmax并在z轴上自动缩放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆