This function can be used to generate interactive grob polygons.
interactive_polygon_grob(x = unit(c(0, 1), "npc"), y = unit(c(0, 1),
"npc"), id = NULL, id.lengths = NULL, tooltip = NULL,
onclick = NULL, data_id = NULL, default.units = "npc",
name = NULL, gp = gpar(), vp = NULL)A numeric vector or unit object specifying x-locations.
A numeric vector or unit object specifying y-locations.
A numeric vector used to separate locations in x and
y into multiple polygons. All locations with the same
id belong to the same polygon.
A numeric vector used to separate locations in x and
y into multiple polygons. Specifies consecutive blocks of
locations which make up separate polygons.
tooltip associated with polygons
javascript action to execute when polygon is clicked
identifiers to associate with polygons
A string indicating the default units to use
if x, y, width, or height
are only given as numeric vectors.
A character identifier.
An object of class gpar, typically the output
from a call to the function gpar. This is basically
a list of graphical parameter settings.
A Grid viewport object (or NULL).