[R] 2d plotting and colours

From: Asha Jayanthi <ashajayanthi_at_hotmail.com>
Date: Wed 30 Mar 2005 - 16:20:37 EST


I am new to R just 3 days in it and i apologize if my questions seem very trivial and consumed your valuable time.

I am coding in perl and i stumbled upon R regarding plotting good statistical graphs.

I tried the kmean clustering for a large matrix ,say > 150 * 150 . I tried the example code given in the tutorial to perform 2d plot

# i ranges from 2 to 10
cl <- kmeans(x, i, 20)
plot(x, col = cl$cluster)
points(cl$centers, col = 1:i )

I see that there are only 8 colours defined , namely black,red,green,blue,cyan,magenta,yello,gray.

How should i set my colour preferences to obtain my palette of colours? I checked in the totorial which talks about R.colors and palatte , but i failed to understand how to set it.

Thank You


MSN Messenger!

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Mar 30 16:26:54 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:57 EST