Description Usage Value Author(s) References Examples
View source: R/get_theme_map.R
Get blank ggplot2 theme for plotting maps
1 |
theme_map A ggplot2 theme object
Juuso Parkkinen louhos@googlegroups.com
See citation("gisfin")
1 2 3 4 5 6 7 8 9 10 | sp.suuralue <- get_helsinki_aluejakokartat(map.specifier="suuralue");
# Need to load rgeos and maptools for ggplot2::fortify in sp2df()
library(rgeos);
library(maptools);
# Transform to df and plot with ggplot2
df.suuralue <- sp2df(sp.suuralue, "Name");
library(ggplot2);
theme_set(get_theme_map());
ggplot(df.suuralue, aes(x=long, y=lat, fill=Name)) +
geom_polygon() + theme(legend.position="none")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.