# \[?\] Combine these plots in a single Manipulate?

**URL:** <https://community.wolfram.com/t/combine-these-plots-in-a-single-manipulate/10587>\
**Category:** Questions\
**Tags:** graphics-and-visualization, interface-construction\
**Created:** [May 25, 2017, 6:41am UTC](https://community.wolfram.com/t/combine-these-plots-in-a-single-manipulate/10587 "2017-05-25T06:41:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![muhammadafzal](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/muhammadafzal/32/34539_2.png) [@muhammadafzal](https://community.wolfram.com/u/muhammadafzal)\
**Post date:** [May 25, 2017, 6:41am UTC](https://community.wolfram.com/t/combine-these-plots-in-a-single-manipulate/10587/1 "2017-05-25T06:41:33Z")

</div>

How can i combine these plots in a single manipulate. I’ll be very much thankful of your help please.

```
Clear[x, t, n];
h[x_] := x;
a = 0;
b = 1;
startpos[k_] := a + (k - 1) 0.01;
a1 = Plot[{1, -1, t, -t}, {t, 0, 1}, AspectRatio -> 1];
Manipulate[
 b = Graphics[
   Table[{Red, Opacity[0.5], Disk[{x, 0}, {0.01, 1}], Green, 
     EdgeForm[Black], Disk[{x, 0}, {0.01, h[x]}]}, {x, 0, r, 0.1}]];
 aa = Table[
   Graphics3D[{{Opacity[2/5], Sphere[{1, 0, 0}, 1]}, {Opacity[1/5], 
      Cylinder[{{i, 0, 0}, {i + 0.02, 0, 0}}, i]}}, 
    Boxed -> False], {i, 0, r, 0.1}];
 Show[a1, b, aa], {r, 0, 1}]

```

---

<div class="post-metadata">

**Author:** ![henrikschachner](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/henrikschachner/32/32119_2.png) [@henrikschachner](https://community.wolfram.com/u/henrikschachner)\
**Post date:** [May 25, 2017, 9:44am UTC](https://community.wolfram.com/t/combine-these-plots-in-a-single-manipulate/10587/2 "2017-05-25T09:44:40Z")

</div>

Hi Muhammad,

of course it still needs fine tuning, but as a first guess: Use `Grid` (or `Row`, or `Column`) instead of `Show`:

```
Clear[x, t, n];
h[x_] := x;
a = 0;
b = 1;
startpos[k_] := a + (k - 1) 0.01;
a1 = Plot[{1, -1, t, -t}, {t, 0, 1}, AspectRatio -> 1];
Manipulate[
 b = Graphics[
   Table[{Red, Opacity[0.5], Disk[{x, 0}, {0.01, 1}], Green, 
     EdgeForm[Black], Disk[{x, 0}, {0.01, h[x]}]}, {x, 0, r, 0.1}]];
 aa = Table[
   Graphics3D[{{Opacity[2/5], Sphere[{1, 0, 0}, 1]}, {Opacity[1/5], 
      Cylinder[{{i, 0, 0}, {i + 0.02, 0, 0}}, i]}}, 
    Boxed -> False], {i, 0, r, 0.1}];
 Grid[{{a1, b}, aa}], {r, 0, 1}]

```

Regards – Henrik
