开发者

Mathematica ColorFunctionScaling

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜