Learn R Programming

datamaps (version 0.0.3)

config_arcs: Configure arcs

Description

Define options of the arcs.

Usage

config_arcs(p, stroke.color = "#DD1C77", stroke.width = 1,
  arc.sharpness = 1, animation.speed = 600, popup.on.hover = FALSE, ...)

Arguments

p

a datamaps object.

stroke.color

arc colors.

stroke.width

arc width.

arc.sharpness

arc sharpness.

animation.speed

arc draw speed in milliseconds.

popup.on.hover

whether to show tooltip.

...

any additional options.

Examples

Run this code
# NOT RUN {
edges <- data.frame(origin = c("USA", "FRA", "BGD", "ETH", "KHM",
                               "GRD", "FJI", "GNB", "AUT", "YEM"),
    target = c("BRA", "USA", "URY", "ZAF", "SAU", "SVK", "RWA", "SWE",
               "TUV", "ZWE"))

edges %>%
    datamaps() %>%
    add_arcs_name(origin, target) %>%
    config_arcs(stroke.color = "blue", stroke.width = 2, arc.sharpness = 1.5,
                animation.speed = 1000)

# }

Run the code above in your browser using DataLab