Create a Colorful Plot with Mathematica's ListPlot Function"

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
Sarah rob
Messages
16
Reaction score
0
If I have a list;
list={ {{1, 2}, {1, 3}, {1, 5}},
{{2, 2}, {2, 4}, {2, 1}},
{{3, 3}, {3, 5}, {3, 2}} }
and want to plot it using ListPlot

  • Is it possibe to colour all the 1st pairs of the list e.g. {1,2}, {2,2}, {3,3} blue, {1,3},
    {2,4},{3,5} green and {1,5}, {2,1}, {3,2} red using PlotMarker or a simular function
 
Physics news on Phys.org
This does what you want:

ListPlot[Table[list[[k]], {k, {1, 2, 3}}],
PlotStyle -> {{Blue, PointSize[Large]}, Green, Red},
PlotRange -> {{0, 6}, {0, 6}}]