1
$\begingroup$

I am a beginner in mathematica. I want to plot many graph in one figure.

I know that if I want to plot two graph(say it as Plot1, Plot2) in one figure, then I can just use Show as

Show[Plot1,Plot2]

However, I want to combine more graph. I have array of plot " Plot[ i ] " where i runs from 1 to n.

Is there any ways to plot all n graphs in one figure without type all graphs like below?

Show[Plot[1],Plot[2],Plot[3],Plot[4], ... , Plot[n] ]
$\endgroup$

closed as off-topic by Carl Lange, m_goldberg, happy fish, MarcoB, Henrik Schumacher Apr 21 at 16:24

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Carl Lange, m_goldberg, happy fish, MarcoB, Henrik Schumacher
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ Try something like Show@@Table[Plot[n],{n, 10}]. Here, @@ applies the function Show to a list that we get from Table - technically, it replaces the List head with Show. You can also pass any List along - so if you already have your list of plots, you can do Show@@plots. $\endgroup$ – Carl Lange Apr 20 at 7:39
  • 2
    $\begingroup$ (It's important to note that Plot is a built-in symbol and you are much better off not overriding it in any way.) $\endgroup$ – Carl Lange Apr 20 at 7:45
  • $\begingroup$ Thank you! I successfully combined graphs with Show@@ . I used another symbol instead of Plot[i], but I will be careful! $\endgroup$ – KYJ Apr 20 at 8:18
1
$\begingroup$

It works straightforward:

pt = Table[Plot[Sin[a*x], {x, 0, 2 Pi}, PlotStyle -> Hue[a/2]], {a, 0.25, 2, 0.25}];
Show[pt, PlotRange -> All]

enter image description here

$\endgroup$

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