Scale Bar, North Arrow, and Pretty Margins in R

Automates the process of creating a scale bar and north arrow in any package that uses base graphics to plot in R. Bounding box tools help find and manipulate extents. Finally, there is a function to automate the process of setting margins, plotting the map, scale bar, and north arrow, and resetting graphic parameters upon completion.


Prettymapr automates the process of creating a scale bar and north arrow in any package that uses base graphics to plot in R. Bounding box tools help find and manipulate extents. Finally, there is a function to automate the process of setting margins, plotting the map, scale bar, and north arrow, and resetting graphic parameters upon completion.

The gist of it:

install.packages("rosm") 
install.packages("prettymapr") #if these are not installed already
 
library(rosm)
library(prettymapr)
osm.plot(searchbbox("wolfville, ns"))
bmaps.plot(searchbbox("wolfville, ns"))
 
#or use prettymapr to remove margins and add scale bar
prettymap(bmaps.plot(searchbbox("wolfville, ns")))

Find more information on the CRAN package page or view the manual.

News

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("prettymapr")

0.2.2 by Dewey Dunnington, 2 years ago


https://github.com/paleolimbot/prettymapr


Report a bug at https://github.com/paleolimbot/prettymapr/issues


Browse source code at https://github.com/cran/prettymapr


Authors: Dewey Dunnington <[email protected]>


Documentation:   PDF Manual  


GPL-2 license


Imports digest, rjson, httr, plyr

Suggests maptools, raster, rosm, testthat, rgdal, sp


Imported by GADMTools, rclimateca, rosm.

Suggested by ggspatial, rcanvec.


See at CRAN