Mark Heckmann
2012-Mar-08 19:27 UTC
[R] "figure margins too large" in RGtk2 drawing area as cairo device - why?
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? Thanks in advance. --Mark PS. My system: R version 2.14.1 (2011-12-22) Platform: i386-apple-darwin9.8.0/i386 (32-bit) MacOS 10.6 ???????????????????????????????????? Mark Heckmann Blog: www.markheckmann.de R-Blog: http://ryouready.wordpress.com
Mark Heckmann <mark.heckmann <at> gmx.de> writes:> > 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.This can be avoided with the following: library(RGtk2) library(cairoDevice) win = gtkWindow(show=FALSE) da = gtkDrawingArea() da$setSizeRequest(700, 700) da$AddEvents(GdkEventMask["all-events-mask"]) gSignalConnect(da, "map-event", function(...) { asCairoDevice(da) return(TRUE) }) win$add(da) win$show() plot(1:10) .. snip ..> > ???????????????????????????????????? > Mark Heckmann > Blog: www.markheckmann.de > R-Blog: http://ryouready.wordpress.com > >
peter dalgaard
2012-Mar-08 21:48 UTC
[R] "figure margins too large" in RGtk2 drawing area as cairo device - why?
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
Mark Heckmann
2012-Mar-09 09:39 UTC
[R] "figure margins too large" in RGtk2 drawing area as cairo device - why?
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt. Name: nicht verf?gbar URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120309/544315be/attachment.pl>