get_theme_map: Get blank ggplot2 theme for plotting maps

Description Usage Value Author(s) References Examples

View source: R/get_theme_map.R

Description

Get blank ggplot2 theme for plotting maps

Usage

1

Value

theme_map A ggplot2 theme object

Author(s)

Juuso Parkkinen louhos@googlegroups.com

References

See citation("gisfin")

Examples

 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")

rOpenGov/gisfin documentation built on May 26, 2019, 8:48 p.m.