Uwe Ligges wrote:

I guess it is clipped in this case. Use par("usr") after ts.plot() to see what the user coordinates are, and whether (1, -0.3) is a sensible location to place the legend.


Uwe Ligges

Just to add to Uwe's good suggestion -- what I usually do is


opar <- par(no.readonly=TRUE)
par(usr=c(0,1,0,1))

Then pick legend co-ordinates, knowing that x and y on the plot canvas now range from 0 to 1. For somewhere near the top-right corner...

legend(0.8,0.8, ...)
par(opar)  ## when done with the plot, to restore the co-ords.

Another choice is instead of the "par" calls...

legend(locator(1), ...)

and click on the plot where you want the legend.

Thirdly, the Hmisc package has a function largest.empty(), which can find the "best" place to put a legend in a plot automagically.

Cheers

Jason

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to