[R] "figure margins too large" in RGtk2 drawing area as cairo device - why?

peter dalgaard pdalgd at gmail.com
Thu Mar 8 22:48:54 CET 2012


On Mar 8, 2012, at 20:27 , Mark Heckmann wrote:

> When using a gtkDrawingArea as a Cairo device I very often encounter the error: "figure margins too large" 
> Even for the below "getting started" example from http://www.ggobi.org/rgtk2/ this is the case.
> 
>> win = gtkWindow()
>> da = gtkDrawingArea()
>> win$add(da)
>> asCairoDevice(da)
> [1] TRUE
>> plot(1:10)   
> Fehler in plot.new() : Grafikränder zu groß
>> 
> 
> Also enlarging the drawing area does not help.
> 
>> win = gtkWindow()
>> da = gtkDrawingArea()
>> win$add(da)
>> asCairoDevice(da)
> [1] TRUE
>> da$setSizeRequest(700, 700)
>> plot(1:10)   
> Fehler in plot.new() : Grafikränder zu groß
> 
> Any ideas?

I'd check the par() settings for the device. Especially mar/mai and cra/cin to see whether margins are set unusually large and/or character sizes are unusually big, but check help(par) yourself. 

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list