Add basic plot callbacks, will only be available in Shiny.

plot_callbacks(g2)

Arguments

g2

An object of class g2r as returned by g2r.

Value

A list containing x and y pixel coordinates of clicked/entered/left.

Details

This function will add the following callbacks

  • plot_enter

  • plot_leave

  • plot_click