[R] repeating symbols and colors

Charles Annis, P.E. Charles.Annis at StatisticalEngineering.com
Wed Nov 1 22:59:01 CET 2006


Here’s an easy one.  Well, easy for those more clever than I am.

I am plotting several groups and use symbols 15:25, pch <- 15:25

Sometimes, however, I need more than those and would like to have them
recycled automatically so that pch[12] = pch[1].  Perhaps I can use %% or
kludge up a multi-line, multi-if solution, but hope that a kind helper can
suggest something more elegant.

I am also using RColorBrewer and like "Set1" but that has only 9 colors.  I
don't want infinitesimal color gradations and would prefer to re-use those
colors if I can find a way to recycle them too.  Since the number of
available colors and available symbols differ, the color/symbol combinations
will be unique for the recycled usage.

Thanks for your counsel.


Charles Annis, P.E.

Charles.Annis at StatisticalEngineering.com
phone: 561-352-9699
eFax:  614-455-3265
http://www.StatisticalEngineering.com
 



More information about the R-help mailing list