geom_image: geom_image

Description Usage Arguments Value Author(s) Examples

View source: R/geom_image.R

Description

geom layer for visualizing image files

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
geom_image(
  mapping = NULL,
  data = NULL,
  stat = "identity",
  position = "identity",
  inherit.aes = TRUE,
  na.rm = FALSE,
  by = "width",
  nudge_x = 0,
  ...
)

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'

nudge_x

horizontal adjustment to nudge image

...

additional parameters

Value

geom layer

Author(s)

Guangchuang Yu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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))

ggimage documentation built on April 2, 2020, 9:07 a.m.

Related to geom_image in ggimage...