6

Let's say I have two manipulated plots:

Manipulate[Plot[Sin[a x], {x, 0, Pi}], {a, 0, 10}]
Manipulate[Plot[Cos[b x], {x, 0, Pi}], {b, 0, 10}]

How can I create a new plot that combines these two and is updated dynamically by each of them? Can I somehow use Show[]?

Of course I could create a unified manipulator, but in reality these are a handful of conceptually separate problems with lots of sliders each and I'd hate to duplicate them all.

nccc
  • 345
  • 2
  • 6

2 Answers2

7

This does what you want.

Manipulate[plots = Plot[Sin[a x], {x, 0, Pi}], {a, 0, 10}] 
Manipulate[plotc = Plot[Cos[b x], {x, 0, Pi}], {b, 0, 10}]
Show[plots, plotc] // Dynamic
Stephen Luttrell
  • 5,044
  • 1
  • 19
  • 18
5

The question is not very clearly posed but may be Panel is what you are looking for.

Panel[Manipulate[Plot[Sin[a x], {x, 0, Pi}], {{a, 2}, 0, 10}]
      Manipulate[Plot[Cos[b x], {x, 0, Pi}], {{b, 2}, 0, 10}], 
      FrameMargins -> 0]

enter image description here

PlatoManiac
  • 14,723
  • 2
  • 42
  • 74