Mathematica颜色函数缩放

5
我在Mathematica中有一个温度的ListDensityPlot,我正在将其随时间发展进行动画处理,但ColorFunction总是将当前步骤的最高温度设置为红色。我希望我的整体最高温度对应于红色,我该如何实现(我认为这与ColorFunctionScaling有关)?
以下是我的代码:
Animate[ListDensityPlot[Dev[[m, All, All]], 
  ColorFunction -> (ColorData["TemperatureMap"])], {m, 1, t, 1}, 
 AnimationRunning -> False]
1个回答

5

设置 ColorFunctionScaling -> False 并手动缩放颜色函数,使用类似以下代码:

ColorFunction -> (ColorData["TemperatureMap"][Rescale[#, {min, max}, {0,1}]&)

这里的minmax分别代表整体的最小值和最大值(很可能是Through[{Min,Max}[Dev]])。


1
谢谢你,Brett,你真的是一个冠军 <3 - user998253

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接