cube_rgb | R Documentation |
A wrapper to build an RGB composite plot.
cube_rgb( cube, bands, wave = c(650, 570, 480), add = FALSE, log = FALSE, fact = 0.9, main = "", ... )
cube |
A raster stack object returned by the |
bands |
A numeric vector of length 3 specifying the bands to be used for the composite. |
wave |
A numeric vector on length 3 specifying the wavelengths to be used the composite. It is an alternative specification of the bands. See Details. |
add |
Logical. Should the plot be added to a previous plot? |
log |
Logical. Should the data be scaled in log space? |
fact |
If log == FALSE, a value for linear scaling. |
main |
Optional plot title. |
As default the function will plot a tru color composite with bands closest the wavelengths 650 nm, 550 nm and 480 nm for the the red, green and channels. Those bands can be changed by specifying the bands directly with the bands argument or by specifying target wavelengths. If wavelengths are specified, the closest available wavelengths to those requested will be used for the composite.
The stretching re-scales the values for a better visual representation of contrast. It can be mapped in log scale or use in a linear scale. If in linear scale, fact is a multiplier of the maximum value in the data set.
Returns the input data invisibly and make a plot of the data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.