[R] (no subject)

j verzani jverzani at gmail.com
Thu Mar 8 22:31:00 CET 2012


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
> 
>



More information about the R-help mailing list