[R] colors in R [was "Re: legend() buglet 2"]

Paul Gilbert pgilbert@bank-banque-canada.ca
Wed, 16 Dec 1998 09:46:50 -0500


I realized after I sent the last message that one of my colours was white, but I
didn't realize that matplot was cycling 1:6 and so I didn't understand why white
on the legend was not white on the plot. There do seem to be two more general

1/ There should be a reliable way to make sure the legend and the plots
correspond. (I almost got messed up really badly in the interpretation of my
results and the current situation seems prone to error.) I think what is needed
is a wrapping together of all the elements describing plot elements (e.g.. type,
bg, lty, col, lwd) in a way so that the same description can be passed to all
related routines such as plot, matplot, legend. Perhaps this is already
available as I know there have been discussions about plotting which I have not
followed very carefully?

2/ It would be nice if this could be done in a way that worked in both R and
Splus so that my plot methods work in both. (I don't necessarily expect the same
line types and colours, but I don't want to maintain two sets of code.)


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