geom_logo: Ggplot2 Raster Logo as Geom Layer

View source: R/ggthemes.R

geom_logoR Documentation

Description

Ggplot2 Raster Logo as Geom Layer

Usage

geom_logo(
  logo = NULL,
  x_npc = 0.9,
  y_npc = 0.925,
  logo_height = 0.06,
  height_units = "npc",
  ...
)

Arguments

Any R object that can be coerced to a raster object. Ex. class of "magick-image"

x_npc

x positioning for logo in normalized parent coordinates 0-1 left to right

y_npc

y positioning for logo in normalized parent coordinates 0-1 bottom to top

logo_height

Desired height of the logo

height_units

Units to set the height (and width) for the logo. Default is NPC i.e. a fraction of the plot panel height

...

Extra control options passed to ggplot2::annotation_custom()

Value

Returns a ggplot geom layer

Examples

library(ggplot2)
ggplot(mtcars, aes(cyl, hp)) + geom_point() + geom_logo(logo_height = 0.06)

gulfofmaine/gmRi documentation built on Jan. 26, 2025, 5:12 a.m.