ggimage (version 0.0.7)

geom_image: geom_image

Description

geom layer for visualizing image files

Usage

geom_image(mapping = NULL, data = NULL, stat = "identity",
  position = "identity", inherit.aes = TRUE, na.rm = FALSE,
  by = "width", color = NULL, ...)

Arguments

mapping

aes mapping

data

data

stat

stat

position

position

inherit.aes

logical, whether inherit aes from ggplot()

na.rm

logical, whether remove NA values

by

one of 'width' or 'height'

color

specify the color of image. NULL for original color

...

additional parameters

Value

geom layer

Examples

Run this code
# NOT RUN {
library("ggplot2")
library("ggimage")
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)
               )
ggplot(d, aes(x, y)) + geom_image(aes(image=image))
# }

Run the code above in your browser using DataCamp Workspace