Displaying 3 results from an estimated 3 matches for "setsizerequest".
2012 Mar 08
3
"figure margins too large" in RGtk2 drawing area as cairo device - why?
...gt; 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-B...
2011 Dec 22
1
RGtk2: How to overlay a gtkDrawingArea with a button or any other widget?
I try to overlay a plot inside a gtkDrawingArea with a button (or any other widget).
I tried to put both into a gtkFixed container.
But this does not work, no printing occurs.
Does someone know a solution?
What I tried:
w <- gtkWindow()
w$setSizeRequest(400,400)
fx <- gtkFixed()
da <- gtkDrawingArea()
fx$put(da, 100, 100)
asCairoDevice(da)
par(mar=c(0,0,0,0))
plot(1:10)
btn.1 <- gtkButton("button")
fx$put(btn.1, 200, 200)
w$add(fx)
Thanks
Mark
????????????????????????????????????
Mark Heckmann
Blog: www.markheckmann...
2012 Mar 05
2
changing the drawing context using Cairo and RGtk2
...Cairo and RGtk2 and have the following problem:
I have a container with two GTK drawing areas converted into Cairo devices.
I know that I can set the current drawing context e.g. using dev.set().
But this is tedious. How can I set the context using the objects da1 or da2?
w <- gtkWindow()
w$setSizeRequest(400, 400)
vbox <- gtkVBox()
da1 <- gtkDrawingArea()
da2 <- gtkDrawingArea()
vbox$add(da1)
vbox$add(da2)
dummy <- asCairoDevice(da1)
dummy <- asCairoDevice(da2)
w$add(vbox)
par(oma=c(0,0,0,0), mar=c(0,0,0,0))
plot(1:10)
THX
--Mark
???????????????????????????????????...