[R] legend problem

Nilza BARROS nilzabarros at gmail.com
Thu Apr 22 22:35:07 CEST 2010


Dear R users,

I have been plotting several graphics in only one page. I intend to plot
only one legend in each page.
Since the graphics are inside a loop I have to do it automatically.
The main problem is that inside the loop I work with differente types of
variables, I mean , the range is different for each one.

I have already tried :

par(xpd=TRUE)
pos<-par("usr")
legend(pos[1],pos[3]-(pos[3]*.05),c("Modelo","Observado"),col =
c("blue","orange"),cex=1.0, pch=15)
I would like to be able to plot the legend outer the graphics region.
Something like I've done with title.
You can see one figure an attached file.

I really appreciate any help.
Nilza Barros







-- 
Abraço,
Nilza Barros


More information about the R-help mailing list