Skip to content
Prev 30649 / 398506 Next

troubles with displaying legend on the plot

Dear colleagues,

Thank you, I've already realized that...

Is is possible to place the legend outside a plot in any other way
except using lattice package?

BTW, maybe it would be useful to place this question in FAQ?
I've searched the mail archive. The question about placing the legend
outside a plot already have arose...
Wednesday, April 16, 2003, 11:52:49, you wrote:
???> Hi! It seems, that y-coord of your legend (1979,0), (0,0) located 
???> outside your coordinate system. 
???> par(usr=c(1979,2002,20,90),mar=c(7, 4, 4, 2) + 0.1)

???> You can use par('usr') to determine extremes of your coordinates 
???> for automatic legend placing. Or you can
???> legend(locator(1),[other options])
???> to place legend on your plot interactively.
???> Notice, that the y-coord has its 0 in the _bottom_ of figure region.