x = {1, 2, 3, 4};
y1 = {3, 4, 5, 6};
y2 = {{5}, {6}, {8}, {9}};
You just need to apply Flatten
to y2
and then plot the transpose of x
and the flattened y2
.
ListPlot[
{Transpose[{x, y1}], Transpose[{x, Flatten[y2]}]},
PlotLegends -> SwatchLegend[{"y1", "y2"}]]