View source: R/scale-interactive.R
| scale_starshape_interactive | R Documentation |
These scales are based on [scale_starshape], [scale_starshape_manual], [scale_starshape_discrete] see the document for those function for more details
scale_starshape_interactive(...)
scale_starshape_manual_interactive(...)
scale_starshape_discrete_interactive(...)
... |
arguments passed to base function, plus any of the [interactive_parameters]. |
library(ggplot2)
library(ggiraph)
iris$id <- seq(nrow(iris))
sps <- as.character(unique(iris$Species))
names(sps) <- sps
p <- ggplot(iris, aes(x=Sepal.Length,
y=Sepal.Width,
fill = Species,
starshape = Species,
tooltip = Species,
data_id = id
)
) +
geom_star_interactive(size=2.5, alpha=.8) +
scale_starshape_manual_interactive(
values = c(1, 12, 15),
tooltip = sps,
data_id = sps,
)
girafe(ggobj=p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.