zipfR.legend is a thin wrapper around the standard
legend function, helping to place the legend box in one
of the corners of the screen without knowing the precise coordinate
ranges in use. Fine control over the placement of the legend box is possible with the
optional arguments margin.x and margin.y.
zipfR.legend is used internally by the high-level plotting
functions plot.spc and plot.vgc.
zipfR.legend(corner, margin.x=.05, margin.y=margin.x,
legend=NULL, bg="white", ...)margin.x, so
in most cases it is sufficient to specify malegend"white", so parts of the plot behind the box are hidden.legend
function and can be used to specify line styles, plot symbols and/or
fill styles for the legend entrieslegend for details on how to specify legend entries.
Most of the options documented there can also be used with
zipfR.legend.
plot.spc, plot.vgc and
zipfR.plotutils for more information about graphics
functions in zipfR## zipfR.legend() can be used with all standard plots as well
plot(sin, 0, 2*pi)
zipfR.legend(2, margin.x=.1, legend="Some silly legend")Run the code above in your browser using DataLab