- data
Either a GDALRaster object from which data will be read, or
a numeric vector of pixel values arranged in left to right, top to
bottom order, or a list of band vectors. If input is vector or list,
the information in attribute gis will be used if present (see read_ds()),
potentially ignoring values below for xsize, ysize, nbands.
- xsize
The number of pixels along the x dimension in data. If data
is a GDALRaster object, specifies the size at which the raster will be
read (used for argument out_xsize in GDALRaster$read()). By default,
the entire raster will be read at full resolution.
- ysize
The number of pixels along the y dimension in data. If data
is a GDALRaster object, specifies the size at which the raster will be
read (used for argument out_ysize in GDALRaster$read()). By default,
the entire raster will be read at full resolution.
- nbands
The number of bands in data. Must be either 1 (grayscale) or
3 (RGB). For RGB, data are interleaved by band.
- max_pixels
The maximum number of pixels that the function will
attempt to display (per band). An error is raised if (xsize * ysize)
exceeds this value. Setting to NULL turns off this check.
- col_tbl
A color table as a matrix or data frame with four or five
columns. Column 1 contains the numeric pixel values. Columns 2:4 contain
the intensities of the red, green and blue primaries (0:1 by default,
or use integer 0:255 by setting maxColorValue = 255).
An optional column 5 may contain alpha transparency values, 0 for fully
transparent to 1 (or maxColorValue) for opaque (the default if column 5
is missing). If data is a GDALRaster object, a built-in color table will
be used automatically if one exists in the dataset.
- maxColorValue
A number giving the maximum of the color values range
in col_tbl (see above). The default is 1.
- normalize
Logical. TRUE to rescale pixel values so that their
range is [0,1], normalized to the full range of the pixel data by default
(min(data), max(data), per band). Ignored if col_tbl is used.
Set normalize to FALSE if a color map function is used that
operates on raw pixel values (see col_map_fn below).
- minmax_def
Normalize to user-defined min/max values (in terms of
the pixel data, per band). For single-band grayscale, a numeric vector of
length two containing min, max. For 3-band RGB, a numeric vector of length
six containing b1_min, b2_min, b3_min, b1_max, b2_max, b3_max.
- minmax_pct_cut
Normalize to a truncated range of the pixel data using
percentile cutoffs (removes outliers). A numeric vector of length two giving
the percentiles to use (e.g., c(2, 98)). Applied per band. Ignored if
minmax_def is used.
- col_map_fn
An optional color map function (default is
grDevices::gray for single-band data or grDevices::rgb for 3-band).
Ignored if col_tbl is used. Set normalize to FALSE if using a color
map function that operates on raw pixel values.
- xlim
Numeric vector of length two giving the x coordinate range.
If data is a GDALRaster object, the default is the raster xmin, xmax in
georeferenced coordinates, otherwise the default uses pixel/line
coordinates (c(0, xsize)).
- ylim
Numeric vector of length two giving the y coordinate range.
If data is a GDALRaster object, the default is the raster ymin, ymax in
georeferenced coordinates, otherwise the default uses pixel/line
coordinates (c(ysize, 0)).
- interpolate
Logical indicating whether to apply linear interpolation
to the image when drawing (default TRUE).
- asp
Numeric. The aspect ratio y/x (see ?plot.window).
- axes
Logical. TRUE to draw axes (the default).
- main
The main title (on top).
- xlab
Title for the x axis (see ?title).
- ylab
Title for the y axis (see ?title).
- xaxs
The style of axis interval calculation to be used for the x axis
(see ?par).
- yaxs
The style of axis interval calculation to be used for the y axis
(see ?par).
- legend
Logical indicating whether to include a legend on the plot.
Currently, legends are only supported for continuous data. A color table
will be used if one is specified or the raster has a built-in color table,
otherwise the value for col_map_fn will be used.
- digits
The number of digits to display after the decimal point in
the legend labels when raster data are floating point.
- na_col
Color to use for NA as a 7- or 9-character hexadecimal code.
The default is transparent ("#00000000", the return value of
rgb(0,0,0,0)).
- ...
Other parameters to be passed to plot.default().