Learn R Programming

ursa (version 3.11.1)

compose_panel: Plot raster images and decorations on the multipanel layout.

Description

compose_panel divides the multi-band raster image (brick) or layers of raster images (stack) on the sequence of single-band images and plots each image on the separate panel of layout. Panel plotting is finalized by adding of decoration (gridlines, coastline, annotation, scalebar).

Usage

compose_panel(..., silent = FALSE)

Value

NULL

Arguments

...

Set of arguments, which are passed to panel_new, panel_raster, panel_coastline, panel_graticule, panel_annotation, panel_scalebar.

silent

Logical. Value TRUE cancels progress bar. Default is FALSE.

Author

Nikita Platonov platonov@sevin.ru

Details

For each panel of layout the sequence of called functions is permanent:
panel_new - - > panel_raster - - > panel_coastline - - > panel_graticule - - > panel_annotation - -> panel_scalebar.

If this order is undesirable, then call these functions in the required sequence.

See Also

compose_plot, compose_legend

panel_new, panel_raster, panel_coastline, panel_graticule, panel_annotation, panel_scalebar

Examples

Run this code
session_grid(NULL)
a <- ursa_dummy(6)
b1 <- list(maxi=a[1:4]*1e2,mini=a[5:6]/1e2)
print(b1)
b2 <- lapply(b1,function(x) colorize(x,nbreak=ifelse(global_mean(x)<100,5,NA)))
compose_open(b2,byrow=FALSE
            ,legend=list(list("bottom",1:2),list("bottom",3),list("left")))
ct <- compose_panel(b2,scalebar=2,coastline=3:4,gridline=5:6,gridline.margin=5
                   ,annotation.text=as.character(seq(6)))
compose_legend(ct)
legend_mtext(as.expression(substitute(italic("Colorbars are on the bottom"))))
compose_close()

Run the code above in your browser using DataLab