plotAll: Plot several maps according to a prefix

Description Usage Arguments

View source: R/plot.R

Description

Plot several maps according to an attribute prefix. This function is useful when the user wants to plot different attributes using the same legend. Tipically, the strings after the prefixes are years and the rest of the documentation uses "year" with this in mind, but the implementation is generic.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plotAll(
  data,
  prefix,
  title = prefix,
  slices = 5,
  palette = "RdPu",
  additional = NULL,
  extension = "pdf",
  ...
)

Arguments

data

A sf (simple feature) object.

prefix

A string with prefix name. Every attribute starting with this prefix will be drawn in a separate map.

title

A title prefix to be used in the map. The map title will also have the year.

slices

The number of slices. The default value is 5.

palette

A string with an RColorBrewer palette.

additional

One or more tmap functions (concatenated by +) to be drawn after plotting the map.

extension

The file extension. The default is "pdf".

...

Any additional parameter to be passed to tm_fill.


pedro-andrade-inpe/colrow documentation built on Dec. 17, 2020, 11:21 p.m.