From murdoch at stats.uwo.ca  Sat May 13 21:27:13 2006
From: murdoch at stats.uwo.ca (murdoch at stats.uwo.ca)
Date: Sat, 13 May 2006 21:27:13 +0200 (CEST)
Subject: [Rd] windows( ... ,rescale="fixed") bug (PR#8857)
Message-ID: <20060513192713.AB88F19B29@slim.kubism.ku.dk>

On 5/13/2006 1:51 PM, Duncan Murdoch wrote:
> On 5/13/2006 12:54 PM, Gerhard.Thallinger at tugraz.at wrote:
>> Full_Name: Gerhard Thallinger
>> Version: 2.3.0; 2.2.0
>> OS: Windows XP
>> Submission from: (NULL) (212.183.54.87)
>>
>>
>> Invoking windows() with the parameter rescale="fixed" followed by plot.new()
>> or any other plot command causes very often the following error:
>>
>>   windows(width=7, height=7, rescale="fixed");plot.new()
>>   Error in plot.new() : outer margins too large (fig.region too small)
>>
>> The values in the width and height parameters seem not to have an influence.
>> Investigating the problem more deeply shows that certain values
>> in the device structure are set to 0 or have some invalid value 
>> (bty, cex, ljoin, ... ) after the call to windows() when plot.new() fails.
>>
>> This indicates that the device structure is either not initialized properly 
>> or gets clobbered somehow.
>>
> 
> I can confirm the bug in R-devel.  A workaround is to open the window 
> without specifying "fixed", then in the menu, select fixed.  That 
> suggests to me something wasn't being initialized.  I'll take a look...

I've taken a look, and tracked it down this far:

While setting up, the graphics device installs a callback called 
HelpExpose that's called when drawing the window.  For some reason I 
haven't figured out, rescale="fixed" causes this to be called before the 
window is ready, and junk in the structure leads to the error.

I won't be able to do any more on this for a couple of days.

Duncan Murdoch



[Rd] windows( ... ,rescale="fixed") bug (PR#8857)
murdoch at stats.uwo.ca