So I am trying to use Animate for my 3D Plot, to see how the function changes with respect to time. But for some reason the z axis keeps rescaling such that the function appears to be constant (but isn't actually). My question is: Is it possible to fix the axis? if yes, how? Here is my code:

uh[x_, y_, t_] = 1 + E^(-2 t)*Sin[x]*Sin[y];
Animate[Plot3D[uh[x, y, t], {x, -2 π, 2 π}, {y, -2 π, 2 π}], {t, 0, π}, AnimationRunning -> False]

Thanks in advance

  • $\begingroup$ Use PlotRange -> {0, 2} in Plot3D? $\endgroup$ – kglr Oct 28 '14 at 0:49
  • $\begingroup$ I tried but I feel like the result should be different... But I dont see what would be wrong. Any idea? $\endgroup$ – Gregoire Du Pasquier Oct 28 '14 at 0:57
  • $\begingroup$ just posted what get in Version (Windows 8) when change the PlotRange. $\endgroup$ – kglr Oct 28 '14 at 1:02
uh[x_, y_, t_] = 1 + E^(-2 t)*Sin[x]*Sin[y];
  uh[x, y, t], {x, -2 π, 2 π}, {y, -2 π, 2 π}, 
  PlotRange -> {0, 2}, BoxRatios -> 1, 
  PerformanceGoal -> "Quality"], {t, 0, π}, 
 AnimationRunning -> True, AnimationDirection -> ForwardBackward]

enter image description here


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.