Learn R Programming

ggimage (version 0.3.6)

geom_image_interactive: Create interactive image of ggimage

Description

The geometry is based on geom_image(). See the documentation for those functions for more details.

Usage

geom_image_interactive(...)

Arguments

...

see also the parameters of geom_image() of ggimage

Examples

Run this code
if (FALSE) {
library("ggplot2")
library("ggimage")
library("ggiraph")
set.seed(2017-02-21)
d <- data.frame(x = rnorm(10),
                y = rnorm(10),
                image = sample(c("https://www.r-project.org/logo/Rlogo.png",
                                "https://jeroenooms.github.io/images/frink.png"),
                              size=10, replace = TRUE)
               )
d$id <- sample(10)
p <- ggplot(d, aes(x, y)) + 
     geom_image_interactive(aes(image=image, tooltip = id, data_id = id))
girafe(ggobj = p)
}

Run the code above in your browser using DataLab