Group Abstract Group Abstract

Message Boards Message Boards

Updating PlotLabels when using Manipulate for multiple plots

POSTED BY: Gaurav Khanna
3 Replies

Rohit -- I actually think what did the trick was the Evaluate function. You can see the actual expressions even if you remove the LocalizeVariables -> False condition.

POSTED BY: Gaurav Khanna
Posted 3 years ago

Hi Gaurav,

Manipulate scopes local variables by default. To avoid that, add the option LocalizeVariables -> False.

enter image description here

To show the actual values of k, a, phi

Manipulate[
 Plot[{Sin[x], Evaluate[a Sin[k x + phi]]}
  , {x, 0, 2 Pi}
  , PlotLabels -> Placed["Expressions", Above]]
 , {k, .1, 4}, {a, 1, 2}, {phi, 0, 2 Pi}
 , LocalizeVariables -> False]

enter image description here

POSTED BY: Rohit Namjoshi

Rohit -- thanks for your response and that seemed to work!

POSTED BY: Gaurav Khanna
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard