I want to make a point plot of a table with lists in it. Assume I have data like this:
data={{1,2,3,4},{5,6},{1,5},{2,4}};
and now I want to make a point plot which has points at the following places in the plot: (1,1), (1,2), (1,3), (1,4), (2,5), (2,6), (3,1), (3,5), (4,2) and (4,4).
Is there a quick way to do this, I couldn't figure it out. Thanks in advance!
data = {{1, 2, 3, 4}, {5, 6}, {1, 5}, {2, 4}}; points = Flatten[MapIndexed[Transpose@{ConstantArray[First@#2, Length@#], #} &,data], 1]; ListPlot[points, PlotStyle -> Directive[Red,PointSize[Large]]]
$\endgroup${1,2,3,4}
(== Range[Length@data]
) ? $\endgroup$