add_image: Adds png image to a plot

Description Usage Arguments

View source: R/add_image.R

Description

Function adapted from from Marc in the box to add a png picture to a plot. Original function in: https://stackoverflow.com/questions/27800307/adding-a-picture-to-plot-in-r

Usage

1
add_image(obj, x = NULL, y = NULL, width = NULL, interpolate = TRUE)

Arguments

obj

an image file imported as an array (e.g. png::readPNG, jpeg::readJPEG)

x

mid x coordinate for image

y

mid y coordinate for image

width

width of image (in x coordinate units)

interpolate

Logical. Passed to graphics::rasterImage. Indicates whether to apply linear interpolation to the image when drawing.


liibre/rladiesantifa documentation built on Nov. 18, 2021, 7:24 p.m.