Skip to content

Commit 4d8788b

Browse files
committed
Merge branch 'master' of github.com:ropensci/plotly into fix/ns
2 parents 308ff92 + 1d5e045 commit 4d8788b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+371
-897
lines changed

DESCRIPTION

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: plotly
22
Title: Create Interactive Web Graphics via 'plotly.js'
3-
Version: 4.3.4
3+
Version: 4.3.5
44
Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
55
email = "[email protected]"),
66
person("Chris", "Parmer", role = c("aut", "cph"),
@@ -17,7 +17,7 @@ Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
1717
email = "[email protected]"))
1818
License: MIT + file LICENSE
1919
Description: Easily translate 'ggplot2' graphs to an interactive web-based version and/or create custom web-based visualizations directly from R. Once uploaded to a 'plotly' account, 'plotly' graphs (and the data behind them) can be viewed and modified in a web browser.
20-
URL: https://plot.ly/r, https://github.com/ropensci/plotly
20+
URL: https://plot.ly/r, https://cpsievert.github.io/plotly_book/, https://github.com/ropensci/plotly
2121
BugReports: https://github.com/ropensci/plotly/issues
2222
Depends:
2323
R (>= 2.10),
@@ -37,6 +37,7 @@ Imports:
3737
hexbin,
3838
lazyeval (>= 0.2.0)
3939
Suggests:
40+
MASS,
4041
maps,
4142
ggthemes,
4243
GGally,

NAMESPACE

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Generated by roxygen2: do not edit by hand
22

3+
S3method(arrange_,plotly)
4+
S3method(distinct_,plotly)
5+
S3method(filter_,plotly)
36
S3method(geom2trace,GeomBar)
47
S3method(geom2trace,GeomBlank)
58
S3method(geom2trace,GeomBoxplot)
@@ -14,12 +17,19 @@ S3method(geom2trace,default)
1417
S3method(ggplotly,ggmatrix)
1518
S3method(ggplotly,ggplot)
1619
S3method(ggplotly,plotly)
20+
S3method(group_by_,plotly)
21+
S3method(groups,plotly)
1722
S3method(layout,matrix)
1823
S3method(layout,plotly)
24+
S3method(mutate_,plotly)
1925
S3method(plotly_build,gg)
2026
S3method(plotly_build,list)
2127
S3method(plotly_build,plotly)
2228
S3method(print,plotly_figure)
29+
S3method(rename_,plotly)
30+
S3method(select_,plotly)
31+
S3method(slice_,plotly)
32+
S3method(summarise_,plotly)
2333
S3method(to_basic,GeomAbline)
2434
S3method(to_basic,GeomArea)
2535
S3method(to_basic,GeomBoxplot)
@@ -45,6 +55,8 @@ S3method(to_basic,GeomTile)
4555
S3method(to_basic,GeomViolin)
4656
S3method(to_basic,GeomVline)
4757
S3method(to_basic,default)
58+
S3method(transmute_,plotly)
59+
S3method(ungroup,plotly)
4860
export("%>%")
4961
export(add_area)
5062
export(add_bars)
@@ -68,29 +80,25 @@ export(add_text)
6880
export(add_trace)
6981
export(arrange)
7082
export(arrange_)
71-
export(arrange_.plotly)
7283
export(as.widget)
84+
export(as_widget)
7385
export(config)
7486
export(distinct)
7587
export(distinct_)
76-
export(distinct_.plotly)
7788
export(do)
7889
export(do_)
7990
export(embed_notebook)
8091
export(event_data)
8192
export(export)
8293
export(filter)
8394
export(filter_)
84-
export(filter_.plotly)
8595
export(geom2trace)
8696
export(get_figure)
8797
export(gg2list)
8898
export(ggplotly)
8999
export(group_by)
90100
export(group_by_)
91-
export(group_by_.plotly)
92101
export(groups)
93-
export(groups.plotly)
94102
export(hide_colorbar)
95103
export(hide_guides)
96104
export(hide_legend)
@@ -99,7 +107,6 @@ export(last_plot)
99107
export(layout)
100108
export(mutate)
101109
export(mutate_)
102-
export(mutate_.plotly)
103110
export(offline)
104111
export(plot_ly)
105112
export(plotly)
@@ -112,29 +119,23 @@ export(plotly_empty)
112119
export(plotly_json)
113120
export(rename)
114121
export(rename_)
115-
export(rename_.plotly)
116122
export(renderPlotly)
117123
export(schema)
118124
export(select)
119125
export(select_)
120-
export(select_.plotly)
121126
export(signup)
122127
export(slice)
123128
export(slice_)
124-
export(slice_.plotly)
125129
export(style)
126130
export(subplot)
127131
export(summarise)
128132
export(summarise_)
129-
export(summarise_.plotly)
130133
export(toRGB)
131134
export(toWebGL)
132135
export(to_basic)
133136
export(transmute)
134137
export(transmute_)
135-
export(transmute_.plotly)
136138
export(ungroup)
137-
export(ungroup.plotly)
138139
import(ggplot2)
139140
importFrom(base64enc,base64encode)
140141
importFrom(dplyr,arrange)

NEWS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# 4.3.5 --
2+
3+
## NEW FEATURES
4+
5+
* The internal `as_widget()` function was exported to make it easier to convert a list
6+
(adhering to the plotly spec) to a plotly htmlwidget object. This should only be needed when "manually" editing the underlying list object.
7+
* Warnings about missing attributes now supply information about the relevant trace.
8+
9+
## CHANGES
10+
11+
* vignettes were removed and that documentation will now be hosted at <https://cpsievert.github.io/plotly_book/>
12+
13+
## BUG FIXES
14+
15+
* Get event_data() working with subplots. Fixes #663
16+
117
# 4.3.4 -- 31 August 2016
218

319
## CHANGES

R/add.R

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,20 @@ add_data <- function(p, data = NULL) {
2424
#' @param p a plotly or ggplot object.
2525
#' @param ... These arguments are documented in the references section below.
2626
#' Note that acceptable arguments depend on the trace type.
27-
#' @param x the x variable.
28-
#' @param y the y variable.
29-
#' @param text textual labels.
30-
#' @param ymin a variable used to define the lower boundary of a polygon.
31-
#' @param ymax a variable used to define the upper boundary of a polygon.
3227
#' @param color Either a variable name or a vector to use for color mapping.
33-
#' @param alpha alpha channel applied to color (on 0-1 scale).
3428
#' @param symbol Either a variable name or a (discrete) vector to use for symbol encoding.
3529
#' @param size A variable name or numeric vector to encode the size of markers.
3630
#' @param linetype Either a variable name or a (discrete) vector to use for linetype encoding.
3731
#' @param data A data frame to associate with this trace (optional). If not
3832
#' provided, arguments are evaluated using the data frame in \code{\link{plot_ly}()}.
33+
#' @param z a numeric matrix
34+
#' @param x the x variable.
35+
#' @param y the y variable.
36+
#' @param text textual labels.
37+
#' @param ymin a variable used to define the lower boundary of a polygon.
38+
#' @param ymax a variable used to define the upper boundary of a polygon.
39+
#' @param xend "final" x position (in this context, x represents "start")
40+
#' @param yend "final" y position (in this context, y represents "start")
3941
#' @seealso \code{\link{plot_ly}()}
4042
#' @references \url{https://plot.ly/r/reference/}
4143
#' @author Carson Sievert
@@ -413,6 +415,7 @@ add_surface <- function(p, z = NULL, ...) {
413415

414416
#' @inheritParams add_trace
415417
#' @rdname add_trace
418+
#' @param geo anchor this trace on which geo object?
416419
#' @export
417420
#' @examples
418421
#' plot_ly() %>% add_scattergeo()

R/ggplotly.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#' @param originalData should the "original" or "scaled" data be returned?
1616
#' @param source Only relevant for \link{event_data}.
1717
#' @param ... arguments passed onto methods.
18-
#' @seealso \link{signup}, \link{plot_ly}
18+
#' @seealso \code{\link{signup}()}, \code{\link{plot_ly}()}
1919
#' @return a plotly object
2020
#' @export
2121
#' @author Carson Sievert

R/group2NA.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ group2NA <- function(data, groupNames = "group", nested = NULL, ordered = NULL,
5454
for (i in c(nested, groupNames)) {
5555
data <- dplyr::group_by_(data, i, add = TRUE)
5656
}
57+
# TODO: this is slow, can it be done with dplyr::slice()?
5758
d <- if (retrace.first) {
58-
dplyr::do(data, rbind(., .[1,], NA))
59+
dplyr::do(data, rbind.data.frame(., .[1,], NA))
5960
} else {
60-
dplyr::do(data, rbind(., NA))
61+
dplyr::do(data, rbind.data.frame(., NA))
6162
}
6263
# TODO: how to drop the NAs separating the nested values? Does it even matter?
6364
# d <- dplyr::ungroup(d)

R/helpers.R

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#'
33
#' @param p a plotly object.
44
#' @export
5-
#' @seealso \link{hide_legend}, \link{hide_colorbar}
5+
#' @seealso \code{\link{hide_legend}()}, \code{\link{hide_colorbar}()}
66
#'
77

88
hide_guides <- function(p) {
@@ -14,7 +14,7 @@ hide_guides <- function(p) {
1414
#'
1515
#' @param p a plotly object.
1616
#' @export
17-
#' @seealso \link{hide_legend}
17+
#' @seealso \code{\link{hide_legend}()}
1818
#' @examples
1919
#'
2020
#' plot_ly(economics, x = ~date, y = ~unemploy / pop, color = ~pop) %>%
@@ -38,7 +38,7 @@ hide_colorbar <- function(p) {
3838
#'
3939
#' @param p a plotly object.
4040
#' @export
41-
#' @seealso \link{hide_legend}
41+
#' @seealso \code{\link{hide_legend}()}
4242
#' @examples
4343
#'
4444
#' plot_ly(economics, x = ~date, y = ~unemploy / pop, color = ~pop) %>%
@@ -82,7 +82,9 @@ toWebGL <- function(p) {
8282

8383
#' Create a complete empty plotly graph.
8484
#'
85-
#' Useful when used with \link{subplot}
85+
#' Useful when used with \code{\link{subplot}()}
86+
#'
87+
#' @param ... arguments passed onto \code{\link{plot_ly}()}
8688
#'
8789
#' @export
8890
plotly_empty <- function(...) {

0 commit comments

Comments
 (0)