dotplot() colors are plotted (probably unintentionally?) in reverse order. x <- c(rep(1,3),rep(2,3),rep(3,3)) dotplot(x,groups=factor(x),col=x) # 1 plotted with col=3, etc. Thank you very much. Rashid Nassar --please do not edit the information below-- Version: platform = i586-pc-linux-gnu arch = i586 os = linux-gnu system = i586, linux-gnu status = major = 1 minor = 1.0 year = 2000 month = June day = 15 language = R Search Path: .GlobalEnv, package:MASS, Autoloads, package:base -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
rnassar@duke.edu writes:> dotplot() colors are plotted (probably unintentionally?) in reverse order. > > x <- c(rep(1,3),rep(2,3),rep(3,3)) > dotplot(x,groups=factor(x),col=x) # 1 plotted with col=3, etc.Yes. This is caused by o <- rev(order(as.numeric(groups))) x <- x[o] groups <- groups[o] and no corresponding reordering of color. A little care is needed when fixing this since color is not necessarily a vector. Same thing with lcolor, by the way. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._