Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to plot two functions. Function G8 and G9. Both should be manipulable. Function G9 should dependent on Function G8. Function G8 has a bigger starting value. If function G8 increases by δ function G9 should also increase by δ. And I want to manipulate δ.

Manipulate[G8 := Plot[a, {x, 0, 8}]; 
 G9 := Plot[d, {x, 0, 8}, PlotStyle -> Red];
 Show[G8, G9],
 {a, 4, 20, Appearance -> "Labeled"}, {d, a - δ, 20, 
  Appearance -> "Labeled"}, {δ, 1, 20, 0.1, 
  Appearance -> "Labeled"}]    

Can anybody help me? Thak you!

share|improve this question

closed as too localized by cormullion, Artes, Sjoerd C. de Vries, halirutan, m_goldberg Jun 10 '13 at 6:00

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Thanks I think I figured out how it works.

Manipulate[G8 := Plot[a, {x, 0, 8}];
 G9 := Plot[a - \[Delta], {x, 0, 8}, PlotStyle -> Red];
 Show[G8, G9], {a, 4, 20, Appearance -> "Labeled"}, {\[Delta], 1, 20, 
  0.1, Appearance -> "Labeled"}]
share|improve this answer
This continually updates (reevaluates -- look at the cell bracket). I know you had said you need to use Show, but why not use Plot[{a, a - δ}, {x, 0, 8}, PlotStyle -> {Automatic, Red}] and perhaps set the PlotRange the way you'd like it? – Michael E2 Jun 9 '13 at 18:35
@ Michael E2 thank you. This also works perfectly. I need the Show function because I used the example above just as a proxy for something different. the basis is similiar but the other code more extensive. so if I would use just Plot I would also have to change in the source-code – Milan Ivica Jun 9 '13 at 19:18

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