I wish to show a curved arrow whose color gradient changes according to month, superimposed on a map of the eastern seaboard
require(sf); require(maps); require(ggplot2)
usmap <- st_as_sf(map("state", plot = F, fill = TRUE)) # sf functions & methods that operate on spatial data are prefixed by st_ (spatial type)
seaboard <- c('alabama', 'connecticut', 'georgia', 'maryland', 'mississippi', 'new jersey','new york', 'pennsylvania', 'south carolina', 'florida', 'north carolina', 'delaware','rhode island',
'massachusetts', 'virginia')
monseq <- c('September','October','November','December')
ggplot(data = usmap[usmap$ID %in% seaboard,]) +
geom_sf() + # grey default background for states
theme_bw() + # black grid lines on white background
geom_curve(
aes(x = -75, y = 42.5, xend = -85, yend = 30.5, size=3),
curvature = -0.2,
lineend = "round",
arrow = arrow(length = unit(0.3, "cm"))
) +
scale_colour_gradient(low = "red", high = "blue")
This as far as I've gotten. I also wish to add a circle composed of three black nose-to-tail arrows pointing in a clockwise direction, located above the head of the arrow.
