Debian Codegraph @

R/USSouthPolygon.R

raw
1 #' Polygon for County Map of US South States: Alabama, Georgia, and South
2 #' Carolina
3 #'
4 #' County polygons for Alabama, Georgia, and South Carolina plus an artifical
5 #' variable used for coloring.
6 #'
7 #'
8 #' @usage data("USSouthPolygon")
9 #' @format A data frame with coordinates of the vertices of the county polygons
10 #' (\code{x}, \code{y}) and an artificial variable \code{z} constructed for
11 #' illustrating colored maps.
12 #' @source Polygon data taken from \pkg{maps} package of Becker, Wilks,
13 #' Brownrigg, and Minka (2012). Version 2.2-6.
14 #' \url{https://CRAN.R-project.org/package=maps}
15 #' @keywords datasets
16 #' @examples
17 #' ## generate color palette
18 #' pal <- diverging_hcl(9)
19 #' n <- length(pal)
20 #'
21 #' ## draw shaded polygons
22 #' plot(0, 0, type = "n", xlab = "", ylab = "", xaxt = "n", yaxt = "n", bty = "n",
23 #' xlim = c(-88.5, -78.6), ylim = c(30.2, 35.2), asp = 1)
24 #' polygon(USSouthPolygon, col = pal[cut(na.omit(USSouthPolygon$z), breaks = 0:n/n)])
25 "USSouthPolygon"