4
$\begingroup$

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?

$\endgroup$
3
  • $\begingroup$ see mathematica.stackexchange.com/questions/30540/… 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. $\endgroup$
    – Nasser
    Nov 28, 2013 at 2:25
  • $\begingroup$ Possible duplicates: (116), (5985) $\endgroup$
    – Mr.Wizard
    Nov 28, 2013 at 2:33
  • $\begingroup$ 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. :) $\endgroup$
    – Michael E2
    Nov 28, 2013 at 2:35

2 Answers 2

7
$\begingroup$

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

$\endgroup$
1
1
$\begingroup$

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}
]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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