I have a ListDensityPlot
of a temperature in a can in Mathematica. 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]]
.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With