ggiraph (version 0.4.4)

geom_point_interactive: interactive points

Description

The geometry is based on geom_point. See the documentation for those functions for more details.

Usage

geom_point_interactive(mapping = NULL, data = NULL, stat = "identity",
  position = "identity", na.rm = FALSE, show.legend = NA,
  inherit.aes = TRUE, ...)

Arguments

mapping

The aesthetic mapping, see geom_point.

data

A data frame, see geom_point.

stat

The statistical transformation to use on the data for this layer, as a string, see geom_point.

position

Postion adjustment, see geom_point.

na.rm
show.legend
inherit.aes
...

other arguments passed on to layer. See geom_point.

See Also

ggiraph

Examples

Run this code
# NOT RUN {
# add interactive points to a ggplot -------
library(ggplot2)

# create dataset
dataset = mtcars
dataset$carname = row.names(mtcars)

# plots
gg_point = ggplot(
  data = dataset,
  mapping = aes(x = wt, y = qsec, color = disp,
                tooltip = carname, data_id = carname) ) +
	geom_point_interactive() + theme_minimal()

ggiraph(ggobj = gg_point, width = .7 )
# }

Run the code above in your browser using DataCamp Workspace