hover {loon.ggplot} | R Documentation |
Modify the hover
component
Description
Provides a pop up display as the mouse hovers over a plot element in the interactive plot.
Usage
hover(itemLabel = NULL, showItemLabels = NULL)
Arguments
itemLabel |
A character vector of length |
showItemLabels |
A single logical value: |
Value
a ggproto
object
See Also
active
, linking
, zoom
,
selection
, interactivity
Examples
if(interactive()) {
l_ggplot(mpg, mapping = aes(x = displ, y = cty)) +
geom_point(size = 4) +
# push the states of scatter plot to the histogram
hover(itemLabel =
with(mpg,
paste0("model: ", manufacturer, " ", model, "\n",
"year: ", year, "\n",
"drive way: ", drv, "\n",
"fuel type: ", fl)
),
showItemLabels = TRUE
)
# hover the mouse on top of any point to query
}
[Package loon.ggplot version 1.3.4 Index]