Learn R Programming

cowplot (version 0.9.2)

theme_map: Create a theme for map plotting

Description

The theme created by this function is useful for plotting maps with cowplot default sizing.

Usage

theme_map(base_size = 14, base_family = "")

Arguments

base_size

Overall font size. Default is 14.

base_family

Base font family.

Value

The theme.

Examples

Run this code
# NOT RUN {
usa_data = map_data("usa")
ggplot(usa_data, aes(long, lat, group=region)) + geom_polygon() + theme_map()
ggplot(usa_data, aes(long, lat, fill = region)) + geom_polygon() + theme_map()
ggplot(usa_data, aes(long, lat, fill = region)) + facet_wrap(~region, scales = "free") +
  geom_polygon() + theme_map()
# }

Run the code above in your browser using DataLab