Create a grob

ig_raster(
  image = matrix(c(0, 1), 10, 10),
  x = 0.5,
  y = 0.5,
  width = 1,
  height = 1,
  just = c("centre"),
  hjust = NULL,
  vjust = NULL,
  interpolate = FALSE,
  default.units = getOption("ingrid.default.units", "npc"),
  name = NULL,
  gp = NULL,
  vp = NULL,
  col,
  fill,
  alpha,
  lty,
  lwd,
  lex,
  lineend,
  linejoin,
  linemitre,
  fontsize,
  cex,
  fontfamily,
  fontface,
  lineheight,
  mask,
  clip,
  layout,
  layout.pos.row,
  layout.pos.col
)

Arguments

image

Any R object that can be coerced to a raster object.

x, y

x,y location

width, height

extents

just

The justification of the shape relative to its (x, y) location. If there are two values, the first value specifies horizontal justification and the second value specifies vertical justification. Possible string values are: "left", "right", "centre", "center", "bottom", and "top". For numeric values, 0 means left alignment and 1 means right alignment.

hjust

A numeric vector specifying horizontal justification. If specified, overrides the just setting.

vjust

A numeric vector specifying vertical justification. If specified, overrides the just setting.

interpolate

A logical value indicating whether to linearly interpolate the image (the alternative is to use nearest-neighbour interpolation, which gives a more blocky result). Default: FALSE

default.units

getOption("ingrid.default.units", 'npc')

name

grob name. default: NULL

gp

graphical parameter object created by grid::gpar() or ingrid::gp(). If NULL (default), then a gpar object is created from the relevant arguments to this function i.e. fill, col, etc

vp

viewport object created by grid::viewport(). If NULL (default), then a viewport object is created from a limited subset of arguments to this function i.e. mask, clip, etc

col, fill, alpha, lty, lwd, lex, lineend, linejoin, linemitre, fontsize, cex, fontfamily, fontface, lineheight

See documentation for gp()

mask, clip, layout, layout.pos.row, layout.pos.col

See documentation for grid::viewport()