You can get the legend outside the plot region by
1. First changing the clipping region via par(xpd = TRUE) ; (or xpd=NA). see
?par
2. Specifying x and y coodinates for legend placement outside the limits of
the plot region.
This allows you to include a legend without adding a bunch of useless
w
If you are asking to have the values plotted on top of the legend,
then you can do the following:
plot(x, y, type='n', ...) # create plot, but don't plot
legend('topright', ...)
lines(x,y) # now plot the data
If you want it outside the plot, check the archives for several examples.
On 8/12/07,