addImgToPlot: Add an image to an existing plot

View source: R/all_custom_functions.R

addImgToPlotR Documentation

Add an image to an existing plot

Description

This function can be used to add an image stored in a file to an existing R-plot. The position, size and rotation of the image can be specified.

Usage

addImgToPlot(filename, x = NULL, y = NULL, width = NULL, angle = 0, interpolate = TRUE)

Arguments

filename

A path to an image file.

x

Mid x coordinate for image.

y

Mid y coordinate for image.

width

Width of image (in x coordinate units).

angle

Rotation angle of the image. Rotation is around the image's center.

interpolate

Passed to graphics::rasterImage. A logical vector (or scalar) indicating whether to apply linear interpolation to the image when drawing.


ryannick28/CustomFunctionsYrotha documentation built on June 1, 2025, 4:02 p.m.