Re: [R] col allocation is not right

2010-05-20 Thread jim holtman
Look at the RColorBrewer package to understand how you can create the colors you want. Also do "?colorRampPalette" On Wed, May 19, 2010 at 4:24 PM, Changbin Du wrote: > Thanks, Phil! > > Does that mean only eight colors can be used in R plot? > THe following codes works for me, but, if I use the

Re: [R] col allocation is not right

2010-05-19 Thread Changbin Du
Thanks, Phil! Does that mean only eight colors can be used in R plot? THe following codes works for me, but, if I use the number, it does not work. plot(svm.auc, col=2, main="ROC curves comparing classification performance\n of six machine learning models") legend(0.5, 0.6, c(ns, nb, nr, nt, nl,n

Re: [R] col allocation is not right

2010-05-19 Thread Phil Spector
Changbin - Please take a look at the help file for the function "palette", which is how R maps col= numbers to colors. Also look at the default output of that function: palette() [1] "black" "red" "green3" "blue""cyan""magenta" "yellow" [8] "gray" You might get better result

[R] col allocation is not right

2010-05-19 Thread Changbin Du
plot(svm.auc, col=2, main="ROC curves comparing classification performance\n of six machine learning models") legend(0.5, 0.6, c(ns, nb, nr, nt, nl,ne), 2:6, 9) # Draw a legend. plot(bo.auc, col=3, add=T) # add=TRUE draws on the existing chart plot(rf.auc, col=4, add=T) plot(tree.auc, col=5, add=T