[Rd] graphics device event handling

sgerber sgerber at cs.utah.edu
Tue Dec 20 05:44:27 CET 2011


Hi All

I run across the following situation quite frequently and was wondering if
there exists a simple solution that I missed.

Situation:
I develop some graphical display using the nice basic R graphical
functions (plots, lines, images, histogramm ...).
Now I would like to add a few simple user interaction capabilities.

Problem:
There seems to be no simple callback type event handling for
mouse/keyboard events for the basic graphics devices.
The setGraphicsEventHandlers only work on X11 (on MAC) which doesn't look
nearly as nice as the basic quartz device and doesn't support transparency.

Question:
Is there a way to add graphics event handling to the CairoX11 or quartz
interface in a similar simple fashion as the setGraphicsEventHandlers
framework without requiring packages such as Rgtk and deviceCairo which can
get fairly large and seem somewhat overkill for adding few simple
interactions to existing R plot compositions.


Kind Regards
Sam



More information about the R-devel mailing list