autoplot.MAPshp: Create a basic plot to visualise downloaded shapefiles

View source: R/autoplot.MAPshp.R

autoplot.MAPshpR Documentation

Create a basic plot to visualise downloaded shapefiles

Description

autoplot.MAPshp creates a map of shapefiles downloaded using getShp.

Usage

## S3 method for class 'MAPshp'
autoplot(object, ..., map_title = NULL, facet = FALSE, printed = TRUE)

Arguments

object

A MAPshp object downloaded using getShp with format = "df" specified.

...

Other arguments passed to specific methods

map_title

Custom title used for the plot.

facet

If TRUE, splits map into a separate facet for each administrative level.

printed

Should the plot print to graphics device.

Value

autoplot.MAPshp returns a map (gg object) of the supplied MAPShp dataframe.

Examples

## Not run: 
MDG_shp <- getShp(ISO = "MDG", admin_level = "admin0")
autoplot(as.MAPshp(MDG_shp))

## End(Not run)


malaria-atlas-project/malariaAtlas documentation built on Nov. 5, 2023, 2:03 p.m.