Skip to content

Commit 287fbfb

Browse files
committed
document
1 parent ce62a31 commit 287fbfb

File tree

7 files changed

+10
-7
lines changed

7 files changed

+10
-7
lines changed

R/add.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ add_scattergeo <- function(p, ...) {
522522
#' @inheritParams add_trace
523523
#' @rdname add_trace
524524
#' @export
525-
add_choropleth <- function(p, z = NULL, geo = NULL, ...,
525+
add_choropleth <- function(p, z = NULL, ...,
526526
data = NULL, inherit = TRUE) {
527527
.Deprecated("geo")
528528
p

R/plotly.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ plot_ly <- function(data = data.frame(), ..., type = NULL,
155155
#' the scattermapbox trace type, and enables higher level geometries
156156
#' like \code{\link{add_polygons}()} to work
157157
#'
158+
#' @param data A data frame (optional).
158159
#' @param ... arguments passed along to \code{\link{plot_ly}()}. They should be
159160
#' valid scattermapbox attributes - \url{https://plot.ly/r/reference/#scattermapbox}.
160161
#' Note that x/y can also be used in place of lat/lon.
@@ -180,7 +181,7 @@ plot_mapbox <- function(data = data.frame(), ...) {
180181
# not only do we use this for is_mapbox(), but also setting the layout attr
181182
# https://plot.ly/r/reference/#layout-mapbox
182183
p$x$layout$mapType <- "mapbox"
183-
p
184+
geo2cartesian(p)
184185
}
185186

186187
#' Initiate a plotly-geo object
@@ -190,6 +191,7 @@ plot_mapbox <- function(data = data.frame(), ...) {
190191
#' the scattergeo trace type, and enables higher level geometries
191192
#' like \code{\link{add_polygons}()} to work
192193
#'
194+
#' @param data A data frame (optional).
193195
#' @param ... arguments passed along to \code{\link{plot_ly}()}.
194196
#' @export
195197
#' @author Carson Sievert
@@ -206,7 +208,7 @@ plot_geo <- function(data = data.frame(), ...) {
206208
# not only do we use this for is_geo(), but also setting the layout attr
207209
# https://plot.ly/r/reference/#layout-geo
208210
p$x$layout$mapType <- "geo"
209-
p
211+
geo2cartesian(p)
210212
}
211213

212214

R/plotly_data.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
#' means %>%
4949
#' dplyr::left_join(plots) %>%
5050
#' arrange(mn) %>%
51-
#' .[["p"]] %>%
5251
#' subplot(nrows = NROW(.), shareX = TRUE)
5352
#'
5453
#' # more dplyr verbs applied to plotly objects

man/add_trace.Rd

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plot_geo.Rd

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plot_mapbox.Rd

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plotly_data.Rd

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)