create_map_state: Get data for a 'ggplot2' map of a single U.S. state

Description Usage Arguments Details Value See Also

View source: R/maps.R

Description

Create the state layer for a ggplot2 plot.

Usage

1
2
create_map_state(state = NULL, show_county = TRUE, fill = "white",
  color = "black")

Arguments

state

character for state name. May either be an abbreviation or full name and may be either lower-case or upper-case.

show_county

logical. Whether or not to show county lines for specified state.

fill, color

character. Either a hex code or a valid color name. Parameters passed directly to ggplot2::geom_polygon().

Details

Only works for a single state. Note that when extra layers are added, they must specify a group (e.g. group = ""), in the ggplot2::aes() call. Otherwise, an error message is returned.

Value

gg.

See Also

ggplot2::map_data()


tonyelhabr/teplot documentation built on May 26, 2019, 5:33 a.m.