0

Lets say I have a very simple manipulate in Mathematica given by:

Manipulate[Plot[Sin[a x],{x,-2 Pi,2 Pi}],{a,0,5}]

I want two things which I am unable to do:

  1. I want an animation of the following plot with a being displayed on the plot like a = 'value'

  2. I want to export only the animation with the value of a displayed on it as a movie file. I do not want the slider or anything.

Please suggest. Thanks

Hector
  • 6,428
  • 15
  • 34
Brato
  • 282
  • 2
  • 8

1 Answers1

3
Manipulate[Plot[Sin[a x], {x, -2 Pi, 2 Pi}, PlotLabel -> Row[{"a=", a}]], {a, 0, 5}]

Mathematica graphics

For exporting, there are many posts on exporting Manipulate to animations/movies. Please see this for example

Export animation of a Manipulate autorun sequence?

If the above still does not answer you, then you can follow up.

ps. You can always just export like this (no need for manipulate)

SetDirectory[NotebookDirectory[]];
tbl = Table[ Plot[Sin[a x], {x, -2 Pi, 2 Pi}, 
     PlotLabel -> Row[{"a=", a}]], {a, 0, 5, .1}];
Export["movie.mov", tbl]

Mathematica graphics

Nasser
  • 143,286
  • 11
  • 154
  • 359
  • You beat me by seconds. My take: Manipulate[ Plot[Sin[a x], {x, -2 Pi, 2 Pi}, Epilog -> Inset[Framed[Style["a =" <> ToString[a], 20], Background -> LightYellow], {Right, Bottom}, {Right, Bottom}]], {a, 0, 5}] – Hector Nov 09 '14 at 08:53
  • @Hector Your plot likes nicer with use of Inset. – Nasser Nov 09 '14 at 08:57
  • @Nasser and Hector Thanks for your help. This solves my problem!! – Brato Nov 09 '14 at 09:00