0
$\begingroup$

I am trying to see the time evolution of a scalar field using Manipulate on ListDensityPlot. However, even if I fix the range using PlotRange, the legend keeps changing from frame to frame. Note that this does not happen if I use Manipulate with ListPlot. Here's the code:

Manipulate[
 ListDensityPlot[
  Flatten[Table[{(1 + y[[1 + (i - 1)]]) Cos[\[Theta]], (1 + 
        y[[1 + (i - 1)]]) Sin[\[Theta]], 
     Evaluate[(Subscript[f, 1 + (i - 1)][t] /. sol[[1, 2 + i]])]}, {i,
      1, 200, 1}, {\[Theta], 0, 2 Pi, 0.05 Pi}], 1], 
  PlotRange -> {{-5, 5}, {-5, 5}, {0, 1}}, 
  PlotLegends -> Placed[Automatic, Below]], {t, 0, 5000*2 Pi, 2 Pi}]

I believe this is probably a simple thing I am doing wrong.

Thanks in advance

$\endgroup$
  • $\begingroup$ What is sol?${}$ $\endgroup$ – AccidentalFourierTransform Mar 26 '18 at 2:59
  • $\begingroup$ Sol is an interpolation function that is the solution coming from an NDSolve $\endgroup$ – SSC Napoli Mar 26 '18 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.