# Multiple Sets of Data

I would like to plot multiple sets of x and y data on the same plot with a legend. This is the code I am using right now:

y = Table[f[c1_,inc_], {c1, 0, 3, 0.1}, {inc, {0, 0.2, 0.4, 0.6}}];
x = Table[{c1 + c1 + inc}, {c1, 0, 3,  0.1}, {inc, {0, 0.2, 0.4, 0.6}}];


Each column of y corresponds to a set of y data and each column of x corresponds to a set of x data.

I would like to obtain a plot with multiple curves, ideally with a legend. Ideas?

• May you edit your question and add the definition for f and show the code you have tried. – Edmund Apr 9 '16 at 22:20
• Two things are going to be required: first, learn to use the ListPlot function. Next, learn to manipulate the lists to achieve the form that needed in the plot function. – bill s Apr 10 '16 at 1:46

f[x_, y_] := x^2 y^2;

• How about ListLinePlot[Transpose[y], PlotLegends -> Automatic] – bill s Apr 13 '16 at 19:35
• Hi! I get ListLinePlot::optx: Unknown option PlotLegends in <<1.>> – MathJo Apr 13 '16 at 20:47