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 results by specifying the colors that you
want directly.
- Phil Spector
Statistical Computing Facility
Department of Statistics
UC Berkeley
spector at stat.berkeley.edu
On Wed, 19 May 2010, Changbin Du wrote:
> 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)
> plot(nn.auc, col=6, add=T)
> plot(en.auc, col=9,lty="dotted",lwd=3, add=T)
>
> Hi, Dear community,
>
> I am use the above codes to draw plot, but find that col =9 is not used by
> the R. Instead, it use the col=2 when plot en.auc. WHy this happens and
how
> to check the col allocation in R?
>
> Thanks!
>
>
> --
> Sincerely,
> Changbin
> --
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>