View source: R/utils_mapedit.R
plot_index | R Documentation |
Plot an image index
plot_index(
img = NULL,
object = NULL,
index = NULL,
remove_bg = TRUE,
viewer = get_pliman_viewer(),
all_layers = TRUE,
layer = 1,
max_pixels = 5e+05,
downsample = NULL,
downsample_fun = NULL,
color_regions = custom_palette(),
ncol = NULL,
nrow = NULL,
aspect_ratio = NA
)
img |
An optional |
object |
An object computed with |
index |
The index to plot. Defaults to the index computed from the
|
remove_bg |
Logical value indicating whether to remove the background
when |
viewer |
The viewer option. If not provided, the value is retrieved
using |
all_layers |
Render all layers when |
layer |
The layer to plot when |
max_pixels |
integer > 0. Maximum number of cells to plot the index. If
|
downsample |
integer; for each dimension the number of
pixels/lines/bands etc that will be skipped; Defaults to |
downsample_fun |
function; if given, downsampling will apply
|
color_regions |
The color palette for displaying index values. Default
is |
nrow, ncol |
The number of rows or columns in the plot grid. Defaults to
|
aspect_ratio |
Numeric, giving the aspect ratio y/x. Defaults to |
None
if(interactive()){
# Example usage:
library(pliman)
img <- image_pliman("sev_leaf.jpg")
plot_index(img, index = "B")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.