From baptiste.auguie at googlemail.com  Sat Oct  2 21:01:29 2010
From: baptiste.auguie at googlemail.com (baptiste auguie)
Date: Sat, 2 Oct 2010 21:01:29 +0200
Subject: [Rd] strange interaction between rasterImage and Grid graphics
In-Reply-To: <AANLkTi=4Q0Az8m+fES9erxMHxwB-sNh=AEn0MPCJdVCQ@mail.gmail.com>
References: <AANLkTimX=5B478CCrEjCX0Y0Kw-FVuu=6ED5kYQ0iykY@mail.gmail.com>
	<AANLkTi=4Q0Az8m+fES9erxMHxwB-sNh=AEn0MPCJdVCQ@mail.gmail.com>
Message-ID: <AANLkTik2XqV+_Xox3d5VVD5_iV8J=iqcPPfZHPadvhPr@mail.gmail.com>

Hi,

Thanks for the follow-up.

On 2 October 2010 09:33, Deepayan Sarkar <deepayan.sarkar at gmail.com> wrote:
> On Fri, Oct 1, 2010 at 12:17 AM, baptiste auguie
> <baptiste.auguie at googlemail.com> wrote:
>> Dear all,
>>
>> This may be specific to Mac, I haven't had a chance to test another
>> platform. Consider this,
>>
>> plot(1,1,t="n")
>> rasterImage(matrix(1),1,1,1,1)
>> library(grid)
>> grid.rect(gp=gpar(fill="grey"))
>>
>> The grid.rect covers the full device window as expected. However, when
>> I resize the window ever so slightly (interactive device) the rectGrob
>> is suddenly clipped to the previous plot window. I cannot understand
>> this behavior, and it doesn't happen if one removes the rasterImage()
>> call, so I suspect something iffy is going on with the display list or
>> something.
>
> I can reproduce the behaviour on GNU/Linux x11(type="cairo"), but this
> is inappropriate mixing of base and grid graphics, so officially I
> don't think you are allowed to expect anything at all.
>

I think the gridBase package does this kind of mixing of base and grid
graphics; and also this behavior might be a side-effect of a more
serious bug.

Best regards,

baptiste


> -Deepayan
>
>
>>
>> The only device I've tried is quartz(), x11() crashed with rasterImage,
>>
>> ?*** caught segfault ***
>> address 0x28, cause 'memory not mapped'
>>
>> Traceback:
>> ?1: rasterImage(matrix(1), 1, 1, 1, 1)
>>
>> sessionInfo()
>> R version 2.11.1 (2010-05-31)
>> x86_64-apple-darwin9.8.0
>>
>> locale:
>> [1] en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8
>>
>> attached base packages:
>> [1] grid ? ? ?stats ? ? graphics ?grDevices utils ? ? datasets ?methods ? base
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>



[Rd] strange interaction between rasterImage and Grid graphics
baptiste auguie