On 01/22/2012 06:56 AM, Kevin Burton wrote:
Of course by entering 'blah' you just get a legend of one value. I guess I 
would like to remove the text altogether and put the colored boxes (or circles) 
right next to each other. This would form sort of a gradient. So say I needed a 
legend for 100 colored values on the plot. The colors are generated by:
colors<- rainbow(100)
How would I make such a legend?

Hi Kevin,
It sounds like you want something like color.legend (plotrix) that draws a rectangle with as many colors as you like. However 100 colors would probably require a legend as big as one side of the plot, and you certainly couldn't get 100 readable labels on it. More like 10.

Jim

______________________________________________
R-help@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.

Reply via email to