4

Im a Mathematica newbie. Can someone tell me how to watch the progress of a plot. For example say I want to watch the curve Exp[-x] when x progresses from 0 to 5. How could I do that?

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
Saheer
  • 61
  • 1
  • see http://mathematica.stackexchange.com/questions/30540/how-do-i-put-a-monitor-into-cdf Assuming this is what you meant by "monitor progress of a plot", otherwise if you just mean how to see the plot itself being painted on the screen step by step, that is something else....you can use something like Animate[Plot[Sin[a x], {x, -Pi, Pi}], {a, 1, 10}] for this. – Nasser Nov 28 '13 at 02:25
  • Possible duplicates: (116), (5985) – Mr.Wizard Nov 28 '13 at 02:33
  • Perhaps you mean something like Manipulate[ Plot[Exp[-x], {x, 0, a}, PlotRange -> {{0, 5}, {0, 1}}], {a, 0.001, 5}]? The use of the word Monitor is confusing to us old hacks. :) – Michael E2 Nov 28 '13 at 02:35

2 Answers2

7

try this hack

Dynamic[Plot[Exp[-x], {x, 0, a}, PlotRange -> {{0, 5}, {-.1, 1.1}}]]
Do[a = i; Pause[.1], {i, 0.1, 5, .1}]

enter image description here

Nasser
  • 143,286
  • 11
  • 154
  • 359
  • question about how to achieve the same effect: http://mathematica.stackexchange.com/q/84325/27539 – glS Sep 07 '16 at 20:46
1

Building on the previous procedural 2 liner posted by Nassar, perhaps this functional approach is what you mean? For more information, take a look at "Animate the Zeta Function" in Documentation.

Animate[
 Dynamic[
  Plot[Exp[-x], {x, 0, i}, PlotRange -> {{0, 5}, {-.1, 1.1}}]
 ]
 , {i, 0, 5}
]
LibertyTrooper
  • 321
  • 1
  • 8