[R] Spatstat - Several density plots using the same scale
Rolf Turner
r.turner at auckland.ac.nz
Thu Oct 9 22:00:59 CEST 2008
On 10/10/2008, at 4:48 AM, Arthur Weiss wrote:
> Hi everyone,
>
> I am using the package "spatstat" for ploting kernel maps of my data.
> It is a marked point pattern, the result of mosquito surveillance in a
> area in a week.
> For each trap, the number of individuals captured is the mark of
> the point.
>
>> plot(density(X, weights=X$marks))
>
> makes a nice kernel, but the problem is that I've got several weeks
> and
> for each week the density is re-scaled, which makes comparisons
> useless.
> I've been trying to find some way to pass the scale limits to the
> function
> but just couldn't find.
Not quite sure what the problem is ... but the help for plot.im() says:
.
.
.
numeric-valued images: By default, the range of pixel
values in
'x' is divided into 'n = length(col)' equal subintervals,
which are mapped to the colours in 'col'. (If 'col' was not
specified, it defaults to a vector of 255 colours.)
Alternatively if the argument 'zlim' is given, it should be a
vector of length 2 specifying an interval of real numbers.
This interval will be used instead of the range of pixel
values. The interval from 'zlim[1]' to 'zlim[2]' will be
mapped to the colours in 'col'. This facility enables the
user to plot several images using a consistent colour map.
Does setting the zlim argument accomplish what you want? If not, please
get back to us with more detail.
cheers,
Rolf Turner
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
More information about the R-help
mailing list