demo/rgtkplot.R

require(cairoDevice)
win <- gtkWindow(show = F)
da <- gtkDrawingArea()
asCairoDevice(da)
scale_cb <- function(range) { plot(1:20,(1:20)^range$getValue()) }
s <- gtkHScale(,0.05, 2.00, 0.05)
gSignalConnect(s, "value-changed", scale_cb)
vbox <- gtkVBox()
vbox$packStart(da)
vbox$packStart(s, FALSE)
win$add(vbox)
win$setDefaultSize(400,400)
win$showAll() 
s$setValue(1.00)

Try the RGtk2 package in your browser

Any scripts or data that you put into this service are public.

RGtk2 documentation built on Oct. 14, 2021, 5:08 p.m.