[R] empty density plot for point pattern in spatstat

Rolf Turner r.turner at auckland.ac.nz
Thu Jun 19 00:53:02 CEST 2014



Don,

Pablo and I have been through all that.  The structure of the "im" 
object was fine.  I had no problem at all plotting the image on my 
system.  Pablo could get nothing but blank plots on his system.  The 
problem arose, as he said in a post just now, only on his personal machine.

The problem seems to be peculiar to Windoze XP.  I've no idea just how 
or why it arises however.  Without being able to sit down at Pablo's 
machine (or Chris's machine) and experiment, it is very hard to diagnose 
the problem.

cheers,

Rolf

On 19/06/14 04:39, MacQueen, Don wrote:

> On my system (see info at the end) the plot succeeds.
>
> Can you plot other objects of class "im"?
> (see ?im for examples)
>
>
> Has it even been determined if the problem is with (a) the plotting
> process, or (b) the structure of the object being plotted?
>
>
> To check the structure of the object, you might wish to compare with:
>
>> tmp <- density(redwood)
>> class(tmp)
> [1] "im"
>
>> str(tmp)
> List of 10
>   $ v     : num [1:128, 1:128] 12.8 13.2 13.7 14.2 14.7 ...
>   $ dim   : int [1:2] 128 128
>   $ xrange: num [1:2] 0 1
>   $ yrange: num [1:2] -1 0
>   $ xstep : num 0.00781
>   $ ystep : num 0.00781
>   $ xcol  : num [1:128] 0.00391 0.01172 0.01953 0.02734 0.03516 ...
>   $ yrow  : num [1:128] -0.996 -0.988 -0.98 -0.973 -0.965 ...
>   $ type  : chr "real"
>   $ units :List of 3
>    ..$ singular  : chr "unit"
>    ..$ plural    : chr "units"
>    ..$ multiplier: num 1
>    ..- attr(*, "class")= chr "units"
>   - attr(*, "class")= chr "im"
>   - attr(*, "sigma")= num 0.125
>
>
>
> Using tmp as created above, does
>     image(list(x=tmp$xcol, y=tmp$yrow, z=t(tmp$v)),asp=1)
> succeed?
>
>
>
>
>> version
>                 _
> platform       x86_64-apple-darwin10.8.0
> arch           x86_64
> os             darwin10.8.0
> system         x86_64, darwin10.8.0
> status
> major          3
> minor          0.2
> year           2013
> month          09
> day            25
> svn rev        63987
> language       R
> version.string R version 3.0.2 (2013-09-25)
> nickname       Frisbee Sailing
>
> spatstat 1.36-0



More information about the R-help mailing list