geom_icon: Icons

Description Usage Examples

Description

The icon geom, like the point geom, is used to create scatterplots. Icons are specified by filepaths into an image file.

Usage

1
2
3
geom_icon(mapping = NULL, data = NULL, stat = "identity",
  position = "identity", na.rm = FALSE, show.legend = NA,
  inherit.aes = TRUE, ...)

Examples

1
2
3
4
5
6
7
8
library(dplyr)
library(ggplot2)
data(tidyverse_downloads)

downloads_with_icon <- tidyverse_downloads %>%
   mutate(file_path = system.file("icons",paste0(package,".png"),package = "ggicons"))
 ggplot(downloads_with_icon, aes(x = Jan2017, y = change_percentage, file_path = file_path)) +
 geom_icon()

PatrickRobotham/ggicons documentation built on May 8, 2019, 12:57 a.m.