plotAll: Plot several maps according to a prefix

View source: R/plot.R

plotAllR Documentation

Plot several maps according to a prefix

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

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 Oct. 3, 2023, 8:48 a.m.