# How to get separate ListPlots into a single ListPlot with legends and labels

I am currently getting 2 seperate plots for the stress variation with t as shown in the picture below. I would like to get them in a single plot with legend to distinguish them. Could someone please help me out on this.

• Please have a look at the examples here. – b.gates.you.know.what Nov 16 '18 at 14:54
• The link provided by @b.gatessucks is more than enough if you plot the lists provided by Table (or even the S functions directly) but if you still have problems please provide the functional forms and the data or range. – Titus Nov 16 '18 at 15:13
• Thank you b.gatessucks and Titus – Kepha Nov 16 '18 at 15:31
• Please provide code instead of screenshots of code, to make it easier for others to reproduce your results. – Themis Dec 16 '18 at 17:25

OK, here goes. I think this will work.

Plot[{Sxx[t,0], Syy[t,0]}, {t, 1, 2}, PlotLegends -> {"one", "two"}]


will work. I assume your functions are continuous between 1 and 2. My toy examples are easy to adjust. This is for continuous functions...

f[x_] := 2 x
g[x_] := 3 x
Plot[{f[x], g[x]}, {x, 0, 2}, PlotLegends -> "Expressions"]


...and this is for dicrete functions, where a and b are lists (sets) which contain the output of Sxx, Syy

ListPlot[{a, b}, PlotLegends -> {"one", "two"}]