scale_starshape_interactive: Create interactive scales for ggstar shapes

View source: R/scale-interactive.R

scale_starshape_interactiveR Documentation

Create interactive scales for ggstar shapes

Description

These scales are based on [scale_starshape], [scale_starshape_manual], [scale_starshape_discrete] see the document for those function for more details

Usage

scale_starshape_interactive(...)

scale_starshape_manual_interactive(...)

scale_starshape_discrete_interactive(...)

Arguments

...

arguments passed to base function, plus any of the [interactive_parameters].

Examples

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)

ggstar documentation built on Nov. 5, 2025, 6:36 p.m.