[R] plotting points with different colors

Duncan Murdoch murdoch at stats.uwo.ca
Thu Jun 28 03:37:12 CEST 2001


On Wed, 27 Jun 2001 16:38:12 -0700 (PDT), you wrote in message
<Pine.A41.4.33.0106271629260.197708-100000 at homer03.u.washington.edu>:

>
>I am trying to make a plot where each data point gets
>plotted with a user-defined color, i.e., one set of x-y pairs, with
>each point having a different color, and not, e.g., 3 sets with
>3 different colors. If anyone has tried
>this, I'd appreciate seeing how it's done. I have tried to
>make something analogous to the way "January Pie Sales"
>(from the demo("graphics") set) was done, using 'plot'
>instead of 'piechart', but only the first color in the list
>gets used.

This gives me 10 points in 10 different colours:

  plot(1:10,1:10,col=1:10)

in R 1.3.0 for Windows.  What are you doing that's different?

Duncan Murdoch
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list