Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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.

add comment

1 Answer 1

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
1  
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
add comment

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