1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotly.R
\name{plot_geo}
\alias{plot_geo}
\title{Initiate a plotly-geo object}
\usage{
plot_geo(data = data.frame(), ..., offline = FALSE)
}
\arguments{
\item{data}{A data frame (optional).}
\item{...}{arguments passed along to \code{\link[=plot_ly]{plot_ly()}}.}
\item{offline}{whether or not to include geo assets so that the map
can be viewed with or without an internet connection. The plotlyGeoAssets
package is required for this functionality.}
}
\description{
Use this function instead of \code{\link[=plot_ly]{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 \code{\link[=add_polygons]{add_polygons()}} to work
}
\examples{
\dontshow{if (interactive() || !identical(.Platform$OS.type, "windows")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
map_data("world", "canada") \%>\%
group_by(group) \%>\%
plot_geo(x = ~long, y = ~lat) \%>\%
add_markers(size = I(1))
\dontshow{\}) # examplesIf}
}
\seealso{
\code{\link[=plot_ly]{plot_ly()}}, \code{\link[=plot_mapbox]{plot_mapbox()}}, \code{\link[=ggplotly]{ggplotly()}}
}
\author{
Carson Sievert
}
|