Skip to content

How to move legend of rhohat (spatstat)?

3 messages · Yury Ryabov, Rolf Turner

#
On 13/05/12 20:07, Yury Ryabov wrote:
An object returned by rhohat() is of class "rhohat" and so is plotted
by the method plot.rhohat() which in turn calls upon plot.fv().

If you look at the help for plot.fv() you will see that this takes
arguments "legendpos" and "legendargs" which should allow
you to accomplish what you want.

You can also set "legend=FALSE" in the call to plot(), which will
suppress the legend completely (if it's getting in your way and
annoying you).  And you could then add your own ad hoc legend
in any manner you please by calling the legend() function
directly.

I guess that you can make the background of the legend transparent
by doing

     plot(object,legendargs=list(bg="transparent"))

(where "object" is what is returned by rhohat()) but on my system at least
the background is transparent by default, so this seems unnecessary
to me.

HTH

     cheers,

         Rolf Turner