inset_world: Create a world map emphasizing one country.

Description Usage Arguments Details Value Examples

Description

This function creates a 'ggplot2' plot showing a map of the world on the right panel and an inset showing a country or countries on the left panel.

Usage

1
inset_world(emphasize, ...)

Arguments

emphasize

Character vector with country names as found in the "world" database in the 'maps' package.

Details

The maps data are obtained from the 'maps' package.

Value

A ggplot object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
# Load the package
library(package = "insetmap")

# Prepare the map
inset1 <- inset_world(emphasize = c("Guatemala", "Costa Rica"))
inset1

# Modify a map

# Load ggplot2 package
library(package = "ggplot2")

# Modify the produced plot
inset2 <- inset1 +
  scale_fill_manual(values = c("#ffaaaa", "blue"))
inset2

## End(Not run)

odeleongt/insetmap documentation built on May 29, 2019, 7:19 a.m.