Learn R Programming

redist (version 4.2.0)

plot.redist_map: Plot a redist_map

Description

Plot a redist_map

Usage

# S3 method for redist_map
plot(x, fill = NULL, by_distr = FALSE, adj = FALSE, ...)

Value

ggplot2 object

Arguments

x

the redist_map object

fill

<data-masking> If present, will be used to color the map units. If using data masking, may need to explicitly name argument fill=... in non-interactive contexts to avoid S3 generic issues.

by_distr

if TRUE and fill is not missing and, color by district and indicate the fill variable by shading.

adj

if TRUE, force plotting the adjacency graph. Overrides by_distr.

...

passed on to redist.plot.map (or redist.plot.adj if adj=TRUE). Useful parameters may include zoom_to, boundaries, and title.

Examples

Run this code
data(fl25)
d <- redist_map(fl25, ndists = 3, pop_tol = 0.05)
plot(d)
plot(d, BlackPop/pop)

data(fl25_enum)
fl25$dist <- fl25_enum$plans[, 5118]
d <- redist_map(fl25, existing_plan = dist)
plot(d)

Run the code above in your browser using DataLab