开发者

Mathematica ColorFunctionScaling

开发者 https://www.devze.com 2023-04-13 08:52 出处:网络
I have a ListDensityPlot of a temperature in a can in Mathe开发者_运维百科matica. I am animating its development over time, but the ColorFunction always sets the highest temperature of the current ste

I have a ListDensityPlot of a temperature in a can in Mathe开发者_运维百科matica. I am animating its development over time, but the ColorFunction always sets the highest temperature of the current step to correspond to Red. I want my max temperature overall to correspond to red, how do I do that (I assume it's got something to do with ColorFunctionScaling)?

Here's my code

Animate[ListDensityPlot[Dev[[m, All, All]], 
  ColorFunction -> (ColorData["TemperatureMap"])], {m, 1, t, 1}, 
 AnimationRunning -> False]


Set ColorFunctionScaling -> False and manually scale the color function, using something like

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

where min and max are the overall minimum and maximum (probably Through[{Min,Max}[Dev]].)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号