Learn R Programming

tmap (version 1.6)

tmap_style: Set the default tmap style

Description

Set the default tmap style, which is contained in the global option tmap.style.

Usage

tmap_style(style)

Arguments

style
name of the style. The function tm_style_

Value

the style before changing

See Also

tm_layout for predefined styles, and style_catalogue to create a style catelogue of all available styles.

Examples

Run this code
data(World)

current.style <- tmap_style("classic")
qtm(World, fill="life_exp", fill.title="Life expectancy")

tmap_style("cobalt")
qtm(World, fill="life_exp", fill.title="Life expectancy")

# restore current style
tmap_style(current.style)

Run the code above in your browser using DataLab