Debian Codegraph @

man/USSouthPolygon.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/USSouthPolygon.R
3 \docType{data}
4 \name{USSouthPolygon}
5 \alias{USSouthPolygon}
6 \title{Polygon for County Map of US South States: Alabama, Georgia, and South
7 Carolina}
8 \format{
9 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 }
13 \source{
14 Polygon data taken from \pkg{maps} package of Becker, Wilks,
15 Brownrigg, and Minka (2012). Version 2.2-6.
16 \url{https://CRAN.R-project.org/package=maps}
17 }
18 \usage{
19 data("USSouthPolygon")
20 }
21 \description{
22 County polygons for Alabama, Georgia, and South Carolina plus an artifical
23 variable used for coloring.
24 }
25 \examples{
26 ## generate color palette
27 pal <- diverging_hcl(9)
28 n <- length(pal)
29
30 ## draw shaded polygons
31 plot(0, 0, type = "n", xlab = "", ylab = "", xaxt = "n", yaxt = "n", bty = "n",
32 xlim = c(-88.5, -78.6), ylim = c(30.2, 35.2), asp = 1)
33 polygon(USSouthPolygon, col = pal[cut(na.omit(USSouthPolygon$z), breaks = 0:n/n)])
34 }
35 \keyword{datasets}