# Include multiple Plots with Show & ListPlot into Manipulate?

**URL:** <https://community.wolfram.com/t/include-multiple-plots-with-show-listplot-into-manipulate/8594>\
**Category:** Questions\
**Tags:** graphics-and-visualization, interface-construction\
**Created:** [May 20, 2016, 7:42am UTC](https://community.wolfram.com/t/include-multiple-plots-with-show-listplot-into-manipulate/8594 "2016-05-20T07:42:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![learebanks](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/learebanks/32/14344_2.png) [@learebanks](https://community.wolfram.com/u/learebanks)\
**Post date:** [May 20, 2016, 7:42am UTC](https://community.wolfram.com/t/include-multiple-plots-with-show-listplot-into-manipulate/8594/1 "2016-05-20T07:42:19Z")

</div>

Hi All,  
How do I include multiple Plots with Show & ListPlot into Manipulate & also showing PlotMarkers, Ticks & Grids marks.  
Given the coding for a static Plot / ListPlot :- This is what I want to have as Manipulate plot.

```
Show[ListPlot[Table[{i, 2 i}, {i, 5}], PlotMarkers -> {"X"}, Ticks -> {Table[i, {i, 1, 5}], Table[2 i, {i, 1, 5}]}, 
GridLines -> {Table[i, {i, 1, 5}], Table[2 i, {i, 1, 5}]},
PlotRange -> {{-1, 7}, {-5, 15}}, ImageSize -> Large], Plot[{2 x, (6 - x)*5}, {x, 0, 6}, 
PlotRange -> {{-1, 7}, {-5, 32}}, PlotStyle -> {Thin, Automatic, Red, Dashed}, ImageSize -> Large]]

```

I tried but my Manipulate / Plot does not allow slider movement. See & review coding below.

```
Manipulate[Show[ListPlot[Table[{i, 2 i}, {i, 5}], PlotMarkers -> {"X"}, Ticks -> {Table[i, {i, 1, 5}], Table[2 i, {i, 1, 5}]}, 
GridLines -> {Table[i, {i, 1, 5}], Table[2 i, {i, 1, 5}]}, PlotRange -> {{-1, 7}, {-5, 32}}, 
ImageSize -> Large], Plot[{2 x, (6 - x)*5}, {x, 0, 6}, PlotRange -> {{-1, 7}, {-5, 32}}, 
PlotStyle -> {Thin, Automatic, Red, Dashed}, ImageSize -> Large, Epilog -> {PointSize[0.03], 
Point[{a, (6 - a)*5}], Point[{a, a*2}]}]], {{a, 30/7}, 0, 6}, Button["reset", a = 30/7]]

```

Here is a simple version of the Manipulate that works below, but I want to include PlotMarkers, Ticks & Grids to the Manipulate plot.

```
Manipulate[ Show[Plot[{2 x, (6 - x)*5}, {x, 0, 6}, PlotRange -> {{-1, 7}, {-5, 32}}, ImageSize -> Large, 
Epilog -> {PointSize[0.03], Point[{a, (6 - a)*5}], Point[{a, a*2}]}]], {{a, 3}, 0, 6}, Button["reset", a = 30/7]]

```

Many thanks for any help you can offer. Greatly appreciated.  
Best regards, Lea…

---

<div class="post-metadata">

**Author:** ![mthiel](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mthiel/32/42877_2.png) [@mthiel](https://community.wolfram.com/u/mthiel)\
**Post date:** [May 20, 2016, 9:18am UTC](https://community.wolfram.com/t/include-multiple-plots-with-show-listplot-into-manipulate/8594/2 "2016-05-20T09:18:54Z")

</div>

Hi,

does this work for you?

```
Manipulate[Show[Plot[{2 x, (6 - x)*5}, {x, 0, 6}, PlotRange -> {{-1, 7}, {-5, 32}}, ImageSize -> Large, Epilog -> {Black, PointSize[0.03], Point[{a, (6 - a)*5}], Point[{a, a*2}]}, PlotStyle -> {Thin, Automatic, Red, Dashed}, GridLines -> {Table[i, {i, 1, 5}], Table[2 i, {i, 1, 5}]}], 
ListPlot[Table[{i, 2 i}, {i, 5}], PlotMarkers -> {"X"}, Ticks -> {Table[i, {i, 1, 5}], Table[2 i, {i, 1, 5}]}, PlotRange -> {{-1, 7}, {-5, 32}}, ImageSize -> Large]], {{a, 30/7},0, 6}]

```

![ManipulateCommunity.gif](https://global.discourse-cdn.com/wolfram/original/2X/9/9c344823577484fdca31ec5a634b995d18468f8f.gif)

Cheers,

M.

---

<div class="post-metadata">

**Author:** ![learebanks](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/learebanks/32/14344_2.png) [@learebanks](https://community.wolfram.com/u/learebanks)\
**Post date:** [May 20, 2016, 10:38am UTC](https://community.wolfram.com/t/include-multiple-plots-with-show-listplot-into-manipulate/8594/3 "2016-05-20T10:38:01Z")

</div>

Perfect. Thanks so much.  
It is so close to my coding, I will review carefully.

FYI - PlotStyle → {Thin, Automatic, Red, Dashed} plots a Blue line. Don’t know why ???

---

<div class="post-metadata">

**Author:** ![mthiel](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mthiel/32/42877_2.png) [@mthiel](https://community.wolfram.com/u/mthiel)\
**Post date:** [May 20, 2016, 10:52am UTC](https://community.wolfram.com/t/include-multiple-plots-with-show-listplot-into-manipulate/8594/4 "2016-05-20T10:52:01Z")

</div>

> FYI - PlotStyle → {Thin, Automatic, Red, Dashed} plots a Blue line.  
> Don’t know why ???

I suppose that you need to wrap the options into a “Directive”:

```
Manipulate[
 Show[Plot[{2 x, (6 - x)*5}, {x, 0, 6}, 
   PlotRange -> {{-1, 7}, {-5, 32}}, ImageSize -> Large, 
   Epilog -> {Black, PointSize[0.03], Point[{a, (6 - a)*5}], 
     Point[{a, a*2}]}, 
   PlotStyle -> Directive[Thick, Red, Automatic, Dashed], 
   GridLines -> {Table[i, {i, 1, 5}], Table[2 i, {i, 1, 5}]}], 
  ListPlot[Table[{i, 2 i}, {i, 5}], PlotMarkers -> {"X"}, 
   Ticks -> {Table[i, {i, 1, 5}], Table[2 i, {i, 1, 5}]}, 
   PlotRange -> {{-1, 7}, {-5, 32}}, ImageSize -> Large]], {{a, 30/7},
   0, 6}]

```

I have substituted “Thin” by “Thick” do see it a bit better.

Cheers,

M.

---

<div class="post-metadata">

**Author:** ![biancaeifert](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/biancaeifert/32/1245_2.png) [@biancaeifert](https://community.wolfram.com/u/biancaeifert)\
**Post date:** [May 20, 2016, 11:34am UTC](https://community.wolfram.com/t/include-multiple-plots-with-show-listplot-into-manipulate/8594/5 "2016-05-20T11:34:46Z")

</div>

Marco is right. `PlotStyle -> {Thin, Automatic, Red, Dashed} ` plots the first line `Thin`, the second `Automatic`, the third `Red`, and the fourth `Dashed`. For each line, all other properties keep their default values, so the thickness of lines 2, 3 and 4 is the standard one, the colours are the standard ones except for line 3, and so forth. (If your plot has less than 4 lines, you won’t see all these styles, so it may look even more confusing.) By the way, if you do need multiple styles for different functions, you can use `Directive` inside a list of styles as well, such as `PlotStyle->{Red,Directive[Green,Dashed],Blue}`.

---

<div class="post-metadata">

**Author:** ![learebanks](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/learebanks/32/14344_2.png) [@learebanks](https://community.wolfram.com/u/learebanks)\
**Post date:** [May 21, 2016, 1:26am UTC](https://community.wolfram.com/t/include-multiple-plots-with-show-listplot-into-manipulate/8594/6 "2016-05-21T01:26:00Z")

</div>

Many thanks Marco! All very helpful. Really appreciated.

---

<div class="post-metadata">

**Author:** ![learebanks](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/learebanks/32/14344_2.png) [@learebanks](https://community.wolfram.com/u/learebanks)\
**Post date:** [May 21, 2016, 1:26am UTC](https://community.wolfram.com/t/include-multiple-plots-with-show-listplot-into-manipulate/8594/7 "2016-05-21T01:26:51Z")

</div>

Many thanks Bianca.  
I appreciate your help.  
Best regards, Lea…
