Reputation: 151
I am learning to make some plots in spatstat. I created a poisson point process of just one kind and attached some marks to it - a numerical value. Now when I plot, the plot has by default - circles. These circles are of relative proportion , But these circles are too big on my network. I want to ask if there is some scaling factor to control size of these circles drawn at point realizations.
So, I extracted points from point pattern process and using their x,y I was able to control this with the cex argument in plot function. But this does not control the size in the legend. So I tried to define a basic r legend() function to draw it on the plot. This is lot of additional work and is specific to each case.
So I am wondering if there is some scaling argument for plotting these realizations and their legends from within the spatstat functions.
Could someone guide me please.
Upvotes: 0
Views: 240
Reputation: 4507
You use the argument markscale
to set the scaling of the marks (incl.
in the legend). The built-in dataset spruces
has both coordinates and
marks in meters, so to represent the tree sizes on a true scale you set
markscale = 1
. This means that the diameter (and not the radius as
previously) of the circle representing the tree is equal to the mark
value measured in the coordinate units of the window. So this would be a
"true" map of the forrest:
library(spatstat)
plot(spruces, markscale = 1)
#> Warning: Interpretation of arguments maxsize and markscale has changed (in
#> spatstat version 1.37-0 and later). Size of a circle is now measured by its
#> diameter.
If the mark values had been in decimetre you would have to do
plot(spruces, markscale = 10)
Upvotes: 0