| plot_geo {plotly} | R Documentation |
Use this function instead of plot_ly() to initialize
a plotly-geo object. This enforces the entire plot so use
the scattergeo trace type, and enables higher level geometries
like add_polygons() to work
plot_geo(data = data.frame(), ...)
data |
A data frame (optional). |
... |
arguments passed along to |
Carson Sievert
plot_ly(), plot_mapbox(), ggplotly()
map_data("world", "canada") %>%
group_by(group) %>%
plot_geo(x = ~long, y = ~lat) %>%
add_markers(size = I(1))