I have set of points which will give me three different curves. But I will be plotting them using Graphics.

However, I couldn't seem to understand, how to color them. Three different curves, will need three different colors.

My data points are DataToPlot

Here is the program:

Graphics[{Point[{#1, #2}]} & @@@ DataToPlot  ]

I will be giving the data points and plotting them using Graphics. This is the result of plot. enter image description here

I would like different color for each of the curve. I was able to plot it but couldn't seem to find the way to color them. Can it be done?

  • $\begingroup$ Use something like Drop[DataToPlot, {1, Length@DataToPlot, 3}] $\endgroup$
    – ZaMoC
    Commented May 4, 2017 at 8:55
  • $\begingroup$ @Jenny_mathy I couldn't get. Drop? for plot $\endgroup$
    – L.K.
    Commented May 4, 2017 at 9:08

1 Answer 1


After a first look we can see that we can sort points in triples by y value:

Graphics @ Riffle[
    {Red, Green, Blue}
,   Point /@ Transpose[SortBy[Last] /@ Partition[DataToPlot, 3]]

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.