legend.box | R Documentation |
Define a location of a legend box. Used by legend.bubble
and legend.pie
. This is not intended as a user function.
legend.box(x, y = NULL, maxradius, mab = 1.2, inset = 0, double = F)
x, y |
the x and y co-ordinates to be used to position the legend, see |
maxradius |
the (maximum) radius of the pie or bubble to be represented in the legend. |
mab |
the margin around the bubble or pie. |
inset |
inset distance(s) from the margins as a fraction of the plot region when legend is placed by keyword. |
double |
logical, should the box be double the 'normal' size to allow for pies and bubbles to be displayed in a single legend box. generally not very pretty. |
Returns the corner points of the legend box in user coordinates
Hans Gerritsen
legend.bubble
, legend.pie
plot(1)
box <- legend.box("topleft", maxradius=0.2, inset=0.02)
rect(box[1],box[2],box[3],box[4], border="red", lwd=3, lty=2)
legend.bubble("topleft", z=10, maxradius=0.2, inset=0.02)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.