Learn R Programming

ursa (version 3.11.1)

panel_decor: Add auxiliary elements to the plotting panel.

Description

panel_decor adds over plot sequentially the followed elements: coastline, gridline, scalebar. Unlike panel_decor, function layout.grid does not add scalebar.

Usage

panel_decor(...)

Value

panel_decor returns NULL value.

layout.grid returns NULL value.

Arguments

...

Passed to sequence of plotting functions:

  • panel_graticule. To distinguish the same argument names in different functions it is provided to use prefix “grid.*”, e.g., grid.col="grey40".

  • panel_coastline. To distinguish the same argument names in different functions it is provided to use prefix “coast.*”, e.g., coast.col="grey60".

  • (not applicable for layout.grid) panel_scalebar. To distinguish the same argument names in different functions it is provided to use prefix “scalebar.*”, e.g., scalebar.col="black".

Author

Nikita Platonov platonov@sebin.ru

Details

The sequence of elements is constant. To change order, use direct calling of panel_graticule, panel_coastline, panel_scalebar in any sequence.

Sometimes, for rasters with NA values the followed sequence may be used:


panel_coastline(col="transparent",fill="grey80")
panel_raster(a)
panel_coastline(col="grey40")

Examples

Run this code
session_grid(NULL)
a <- ursa_dummy(nband=1,min=0,max=100)
a[a<30] <- NA
compose_open()
panel_new()
ct <- panel_raster(a)
panel_decor(graticule.col="green4",graticule.lwd=2,scalebar.col="brown")
compose_legend(ct)
compose_close()

Run the code above in your browser using DataLab