Skip to content
Back to formatted view

Raw Message

Message-ID: <opsgz9lxi3f57zr1@bio04.eva.mpg.de>
Date: 2004-11-05T18:57:23Z
From: Marcus Leinweber
Subject: text colour in legend

hello,


the following example gives a plot with a legend:


plot(-10:10,-10:10,type="n")
x=1:10
y=1:10
tt=c("A","B","C","D","E","F")
text(x,y,tt,cex=.8)
legend(-10,10,paste(tt," ",x,y),text.col=c(2:4))  # each row in different  
colour

but how can I colour the legend text by "column" meaning tt in red, x in  
blue and y in green?

thanks for your help.

marcus