theme_map: Clean theme for maps

Description Usage Arguments Examples

View source: R/theme-map.R

Description

A clean theme that is good for displaying maps from geom_map().

Usage

1
theme_map(base_size = 9, base_family = "")

Arguments

base_size

base font size, given in pts.

base_family

base font family

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library("maps")
library("ggplot2")

us <- fortify(map_data("state"), region = "region")
gg <- ggplot() +
  geom_map(data  =  us, map = us,
             aes(x = long, y = lat, map_id = region, group = group),
             fill = "white", color = "black", size = 0.25) +
  coord_map("albers", lat0 = 39, lat1 = 45) +
  theme_map()
gg

Example output

Warning: Ignoring unknown aesthetics: x, y

ggthemes documentation built on Jan. 20, 2021, 5:05 p.m.

Related to theme_map in ggthemes...