Skip to content
Prev 308357 / 398506 Next

legend of maps generated by function symbols

Possible? Yes. (see fortune("Yoda"))
Automated using the legend function? No
Automated using another function? possbly somewhere in the 4,000+
packages on CRAN, but I don't know which.

It is doable with the basic tools.  You could either find a part of
your graph with open area to put the legend in, or you could use the
layout function to create a second smaller blank graph beside yours to
use for the legend.  Use the rect function to draw a rectangle around
where you want the legend to be, choose some values of myvariable that
you want to show sample circles for, then use symbols again to draw
those circles and text to draw the matching values next to the
circles.  The following functions may be of use in choosing how big to
make the rectangle and where to place the circles and text within the
rectangle: strwidth, strheight, grconvertX, grconvertY, and the inches
argument to symbols.


On Thu, Oct 18, 2012 at 3:31 AM, Marion Jacquot
<marion.jacquot at univ-fcomte.fr> wrote: