[R] raster plot is empty

Sarah Goslee sarah.goslee at gmail.com
Thu Sep 22 01:14:57 CEST 2011


Hi,

On Wed, Sep 21, 2011 at 6:31 PM, Alex Olssen <alex.olssen at gmail.com> wrote:
> Dear Sarah,
>
> I am not sure how to make a reproducible example.  The 3 lines of code
> are exactly what I type in either system.  The code can be reproduced,
> but the result is unlikely to be reproduced - for example on my
> desktop this all works fine.  Is there something more I can do to make
> this reproducible?

Ah, I see. You were using data from the raster package, not a local file as it
seemed on first glance.

> Is it helpful if I post the results of
>
> sessionInfo()
>
> ?

Yes, that would be just what I'd asked for. Don't forget the version of raster.

Sarah

> Kind regards,
> Alex
>
> On 22 September 2011 09:55, Sarah Goslee <sarah.goslee at gmail.com> wrote:
>> Alex,
>>
>> We definitely need the output of sessionInfo(), the version of raster,
>> and a reproducible example.
>>
>>
>> Without knowing the versions & OS, it's impossible to say. But my
>> first guess (and
>> it IS a guess) is that the server needs to be updated.
>>
>> Sarah
>>
>>
>> On Wed, Sep 21, 2011 at 5:45 PM, Alex Olssen <alex.olssen at gmail.com> wrote:
>>> Dear R-help,
>>>
>>> I have a problem plotting maps using the raster package when I use R
>>> on my workplace server, but not when I use my own desktop.  I suspect
>>> the server version must be missing something and was wondering if
>>> anyone would have any ideas.
>>>
>>> The problem occurs after
>>>
>>> library(raster)
>>> f <- system.file("external/test.grd", package="raster")
>>> r <- raster(f)
>>> plot(f)
>>>
>>> On my desktop computer this works perfectly.  If I run this on my
>>> workplace server then the axes labels are identical, the legend
>>> numbers are identical, but the plot is empty and the legend has no
>>> colors in it.  This persists even if I specify a color explicitly
>>>
>>> plot(f, col="red")
>>>
>>> for example.
>>>
>>> Any help would be appreciated.
>>>
>>> Kind regards,
>>> Alex
>>>
>>
>> --
>> Sarah Goslee
>> http://www.functionaldiversity.org
>>
>



-- 
Sarah Goslee
http://www.stringpage.com
http://www.sarahgoslee.com
http://www.functionaldiversity.org



More information about the R-help mailing list