Skip to content
YuLab-SMUPublic

About

🎨 Use Images in ggplot2

Topics

Resources

Stars

179 stars

Watchers

5 watching

Forks

Repository files navigation

ggimage: Use Images in ‘ggplot2’

CRAN_Status_Badge DOI

ggimage brings images and graphics into ggplot2—from a picture at each observation to a full-panel background or a miniature plot embedded in the data.

With ggimage, you can:

  • Map images to data: place local files, URLs, or generated image sources at data coordinates, with control over size, aspect ratio, rotation, colour, and transparency.
  • Build image-based plots: add backgrounds with geom_bgimage() and embed plots or other graphic objects as subviews with geom_subview().
  • Use ready-made image sources: draw flags, icons, emoji, Pokemon, or PhyloPic images without manually assembling image layers.
  • Reduce overlap: use geom_image_repel() to separate crowded image marks.
  • Make image plots interactive: use geom_image_interactive() or geom_phylopic_interactive() to add hover and selection interactions in HTML output via ggiraph.

✍️ Authors

Guangchuang YU https://yulab-smu.top

School of Basic Medical Sciences, Southern Medical University

⏬ Installation

Get the released version from CRAN:

## include BioC repo for dependencies
setRepositories(ind=1:2)
install.packages("ggimage")

Or the development version from github:

setRepositories(ind=1:2)
## install.packages("devtools")
devtools::install_github("YuLab-SMU/ggimage")

📖 Vignette

For examples and details, see the package vignette.

About

🎨 Use Images in ggplot2

Topics

Resources

Stars

179 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages