fortify.map

0th

Percentile

Fortify method for map objects

This function turns a map into a data frame that can more easily be plotted with ggplot2.

Keywords
internal
Usage
"fortify"(model, data, ...)
Arguments
model
map object
data
not used by this method
...
not used by this method
See Also

map_data and borders

Aliases
  • fortify.map
Examples
library(ggplot2) if (require("maps")) { ca <- map("county", "ca", plot = FALSE, fill = TRUE) head(fortify(ca)) ggplot(ca, aes(long, lat)) + geom_polygon(aes(group = group)) tx <- map("county", "texas", plot = FALSE, fill = TRUE) head(fortify(tx)) ggplot(tx, aes(long, lat)) + geom_polygon(aes(group = group), colour = "white") }
Documentation reproduced from package ggplot2, version 2.2.1, License: GPL-2 | file LICENSE

Community examples

Looks like there are no examples yet.