| make.RGB | R Documentation |
Make a Red-Green-Blue SpatRaster from a single layer
make.RGB(x, col=grDevices::rainbow(25), breaks=NULL, alpha=FALSE, colNA="white",
zlim=NULL, zlimcol=NULL, ext=NULL, filename="", ...)
x |
RasterLayer |
col |
A color palette, that is a vector of n contiguous colors generated by functions like rainbow, heat.colors, topo.colors, bpy.colors or one or your own making, perhaps using |
breaks |
numeric. A set of finite numeric breakpoints for the colours: must have one more breakpoint than colour and be in increasing order |
alpha |
If |
colNA |
color for the background ( |
zlim |
vector of lenght 2. Range of values to plot |
zlimcol |
If |
ext |
SpatExtent. Can be used to spatially subset the area covered to a region of interest |
filename |
character. Output filename |
... |
options for writing files as in |
SpatRaster
RGB
r <- rast(system.file("ex/elev.tif", package="terra"))
x <- make.RGB(r)
plot(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.