Learn R Programming

itsadug (version 2.0)

plot_image: Add images to plots.

Description

Add images to plots.

Usage

plot_image(img, type = "image", col = NULL, show.axes = FALSE,
  xrange = c(0, 1), yrange = c(0, 1), fill.plotregion = FALSE,
  replace.colors = NULL, add = FALSE, ...)

Arguments

img
Matrix or image object (list with 'image', a matrix, and 'col', a vector with color values), or a string indicating the filename of an image to read.
type
String, 'image' (default), 'png', 'jpeg', 'gif'
col
Vector with colors.
show.axes
Logical: whether or not to plot the axes.
xrange
Two-value vector providing the xleft and xright coordinate values of the picture. Default set to c(0,1).
yrange
Two-value vector providing the ybottom and ytop coordinate values of the picture. Default set to c(0,1).
fill.plotregion
Logical: whether or not to fill the complete plot region. Defaults to FALSE.
replace.colors
Named list for replacing colors. The names are the colors (in hexadecimal values), or regular expressions matching colors. The values are the replacements.
add
Logical: whether or not to add the plot to the current plot.
...
Other arguments for plotting, see par.

Value

  • Optionally returns

See Also

Other Functions for plotting: addInterval, add_bars, alphaPalette, alpha, check_normaldist, color_contour, dotplot_error, drawArrows, emptyPlot, errorBars, fadeRug, fill_area, getCoords, getFigCoords, getProps, gradientLegend, marginDensityPlot, plot_error, plotsurface, rug_model