I wrote a simple example to show the pattern of a stationary wave, using codes as following:

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

However, when I'm running it, the scale of $y$-axis is changing as parameter a is changing. What I want is a fixed $y$-axis range from -1 to 1. What can I do?

P.S. I've tried 'AspectRatio', and it didn't really worked...

enter image description here enter image description here


closed as off-topic by MarcoB, Feyre, corey979, m_goldberg, yohbs Jan 18 '17 at 2:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – MarcoB, Feyre, corey979, m_goldberg, yohbs
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    $\begingroup$ Try PlotRange. $\endgroup$ – Kuba Jan 17 '17 at 13:13

As Kuba said in comments, the PlotRange option does what you want:

 Plot[a Sin[x], {x, 0, 2 Pi}, PlotRange -> {-1, 1}], 
 {a, 0, 1}
  • $\begingroup$ Exactly what I want! tks. $\endgroup$ – JasonJostar Jan 18 '17 at 3:35

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