powered by
Define a location of a legend box. Used by legend.bubble and legend.pie. This is not intended as a user function.
legend.bubble
legend.pie
legend.box(x, y = NULL, maxradius, mab = 1.2, inset = 0, double = F)
Returns the corner points of the legend box in user coordinates
the x and y co-ordinates to be used to position the legend, see legend.
legend
the (maximum) radius of the pie or bubble to be represented in the legend.
the margin around the bubble or pie.
inset distance(s) from the margins as a fraction of the plot region when legend is placed by keyword.
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.
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)
Run the code above in your browser using DataLab