[Rd] getGraphicsEvent() alternative for cairo graphics device?

Daniel Greenidge cdg4 at princeton.edu
Mon Jul 25 20:15:59 CEST 2016


Hi all,

I'm writing an interactive plotting function for viewing fMRI
datasets. Currently, I get keypresses using
grDevices::getGraphicsEvent().

Unfortunately getGraphicsEvent() only supports the X11(type="Xlib")
graphics device on Unix systems. The Xlib device doesn't support
buffering (i.e. dev.hold() and dev.flush()), so redrawing the plots
causes lots of flickering.

Is there a way to get keypresses while using the cairo graphics
device? Alternatively, is there a way to prevent flickering with the
Xlib graphics device?

Best,
Daniel Greenidge



More information about the R-devel mailing list