Skip to content

Commit f99e761

Browse files
authored
v4.9.3 release candidate (#1901)
* prep for release * Disable thematic tests (only temporarily for release) * Resolve URL redirects * More URL redirects * relax the tolerance on new unit test
1 parent e741959 commit f99e761

37 files changed

+165
-169
lines changed

DESCRIPTION

Lines changed: 2 additions & 6 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.9.2.9000
3+
Version: 4.9.3
44
Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
55
email = "cpsievert1@gmail.com", comment = c(ORCID = "0000-0002-4958-2844")),
66
person("Chris", "Parmer", role = "aut",
@@ -20,7 +20,7 @@ Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
2020
person("Plotly Technologies Inc.", role = "cph"))
2121
License: MIT + file LICENSE
2222
Description: Create interactive web graphics from 'ggplot2' graphs and/or a custom interface to the (MIT-licensed) JavaScript library 'plotly.js' inspired by the grammar of graphics.
23-
URL: https://plotly-r.com, https://github.com/ropensci/plotly#readme, https://plot.ly/r
23+
URL: https://plotly-r.com, https://github.com/ropensci/plotly#readme, https://plotly.com/r/
2424
BugReports: https://github.com/ropensci/plotly/issues
2525
Depends:
2626
R (>= 3.2.0),
@@ -74,12 +74,8 @@ Suggests:
7474
processx,
7575
plotlyGeoAssets,
7676
forcats,
77-
thematic,
7877
palmerpenguins
7978
LazyData: true
8079
RoxygenNote: 7.1.1
8180
Encoding: UTF-8
8281
Roxygen: list(markdown = TRUE)
83-
Remotes:
84-
rstudio/thematic,
85-
ramnathv/htmlwidgets

NEWS.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 4.9.2.9000
1+
# 4.9.3
22

33
## Changes to plotly.js
44

@@ -8,7 +8,7 @@
88

99
* `renderPlotly()` now works well with `shiny::bindCache()`, meaning that plotly graphs can now be persistently cached in Shiny apps with `renderPlotly(expr) %>% shiny::bindCache()` (#1879).
1010

11-
* `ggplotly()` now works well with the [**thematic** package](https://rstudio.github.io/thematic). That is, it can now correctly translate **ggplot2** styling that derives from **thematic**. Note that, in order to use **thematic**'s auto theming in Shiny with `ggplotly()`, you need **shiny** v1.5.0 (or higher) and **htmlwidgets** v1.5.2.9000 (or higher). Relatedly, if these versions are available, one may now also call `getCurrentOutputInfo()` inside `renderPlotly()` to get CSS styles of the output container (#1801 and #1802).
11+
* `ggplotly()` now works well with the [**thematic** package](https://rstudio.github.io/thematic/). That is, it can now correctly translate **ggplot2** styling that derives from **thematic**. Note that, in order to use **thematic**'s auto theming in Shiny with `ggplotly()`, you need **shiny** v1.5.0 (or higher) and **htmlwidgets** v1.5.2.9000 (or higher). Relatedly, if these versions are available, one may now also call `getCurrentOutputInfo()` inside `renderPlotly()` to get CSS styles of the output container (#1801 and #1802).
1212

1313
## IMPROVEMENTS
1414

@@ -166,7 +166,7 @@ This is minor patch release with a few minor bug fixes and updates test expectat
166166
* The `name` attribute is now a "special `plot_ly()` argument" and behaves similar to `split` (it ensures a different trace for every unique value supplied). Although this leads to a breaking change (`name` was previously appended to an automatically generated trace name), it leads to a more flexible and transparent API. Those that wish to have the old behavior back should provide relevant mappings to the `name` attributes (e.g. `plot_ly(mtcars, x = ~wt, y = ~mpg, color = ~factor(vs), name = "a")` should become `plot_ly(mtcars, x = ~wt, y = ~mpg, color = ~factor(vs), name = ~paste(vs, "\na"))`)
167167
* The `color` argument now maps to `fillcolor`, making it much easier to use polygon fills to encode data values (e.g., choropleth maps). For backwards-compatibilty reasons, when `color` maps to `fillcolor`, `alpha` defaults to 0.5 (instead of 1). For an example, `plot_mapbox(mn_res, color = ~INDRESNAME)` or `plot_mapbox(mn_res, split = ~INDRESNAME, color = ~AREA, showlegend = FALSE, stroke = I("black"))`.
168168
* The `color` argument no longer automatically add `"markers"` to the `mode` attribute for scatter/scattergl trace types. Those who wish to have the old behavior back, should add `"markers"` to the `mode` explicity (e.g., change `plot_ly(economics, x = ~pce, y = ~pop, color = ~as.numeric(date), mode = "lines")` to `plot_ly(economics, x = ~pce, y = ~pop, color = ~as.numeric(date), mode = "lines+markers")`).
169-
* The `size` argument now informs a default [error_[x/y].width](https://plot.ly/r/reference/#scatter-error_x-width) (and `span` informs [error_[x/y].thickness](https://plot.ly/r/reference/#scatter-error_x-thickness)). Note you can override the default by specifying directly (e.g. `plot_ly(x = 1:10, y = 1:10, size = I(10), error_x = list(value = 5, width = 0))`).
169+
* The `size` argument now informs a default [error_[x/y].width](https://plotly.com/r/reference/#scatter-error_x-width) (and `span` informs [error_[x/y].thickness](https://plotly.com/r/reference/#scatter-error_x-thickness)). Note you can override the default by specifying directly (e.g. `plot_ly(x = 1:10, y = 1:10, size = I(10), error_x = list(value = 5, width = 0))`).
170170
* `layout.showlegend` now defaults to `TRUE` for a *single* pie trace. This is a more sensible default and matches pure plotly.js behavior.
171171

172172
### Other changes relevant for all **plotly** objects
@@ -253,12 +253,12 @@ This is minor patch release with a few minor bug fixes and updates test expectat
253253
* Added a `frame` argument to `plot_ly()` for creating animations. Also added the `animation_opts()`, `animation_slider()`, and `animation_button()` functions for configuring animation defaults.
254254
* Added a new interface to [v2 of the REST API](https://api.plot.ly/v2). This new interface makes the `plotly_POST()` and `get_figure()` functions obsolete (use `api_create()` and `api_download_plot()` instead), and thus, are now deprecated, but remain around for backwards-compatibility. For more details, see `help(api)`.
255255
* Added support for conversion of more **ggplot2** geoms via `ggplotly()`: `GeomCol`, `GeomRug`, `GeomCrossbar`, `GeomQuantile`, `GeomSpoke`, `GeomDotplot`, `GeomRasterAnn` (i.e., `annotation_raster()`), and `GeomAnnotationMap` (i.e., `annotation_map()`).
256-
* Added a new function `raster2uri()` which makes it easier to embed raster objects as [images](https://plot.ly/r/reference/#layout-images) via data URIs. For examples, see `help(raster2uri)`.
256+
* Added a new function `raster2uri()` which makes it easier to embed raster objects as [images](https://plotly.com/r/reference/#layout-images) via data URIs. For examples, see `help(raster2uri)`.
257257
* `ggplotly()` gains a new argument, `dynamicTicks`, which allows axis ticks to update upon zoom/pan interactions (fixes #485).
258258
* Sensible sizing and positioning defaults are now provided for subplots multiple colorbars.
259259
* R linebreaks are translated to HTML linebreaks (i.e., '\n' translates to '<br />') (fixes #851).
260260
* Added a `plot_dendro()` function for a quick and dirty interactive dendrogram with support for hierarchial selection. For more, see -- <https://plotly-r.com/client-side-linking.html#fig:dendro>
261-
* The `export()` function gains a `selenium` argument for rendering/exporting WebGL plots and exporting to 'svg'/'webp' file formats (via the plotly.js function [Plotly.downloadImage()](https://plot.ly/javascript/plotlyjs-function-reference/#plotlydownloadimage)).
261+
* The `export()` function gains a `selenium` argument for rendering/exporting WebGL plots and exporting to 'svg'/'webp' file formats (via the plotly.js function [Plotly.downloadImage()](https://plotly.com/javascript/plotlyjs-function-reference/#plotlydownloadimage)).
262262
* Better type checking of trace attributes will now automatically reduce a single-valued vector to a constant (when appropriate). This is particularly useful for anchoring multiple traces to a single legend entry via `legendgroup` (see #675, #817, #826).
263263
* The `plotlyOutput()` function gains a `inline` argument which makes it easier to place multiple plots in the same row (in a shiny application).
264264

@@ -359,7 +359,7 @@ limits.
359359
## CHANGES
360360

361361
* The `add_scattergeo()` and `add_choropleth()` functions have been deprecated in favor of `plot_geo()`.
362-
* The `add_area(...)` function changed it's meaning from `add_lines(..., fill = 'tozeroy')` to a wrapper around the area trace <https://plot.ly/r/reference/#area>. This is more consistent with the naming conventions already in place for other `add_()` functions.
362+
* The `add_area(...)` function changed it's meaning from `add_lines(..., fill = 'tozeroy')` to a wrapper around the area trace <https://plotly.com/r/reference/#area>. This is more consistent with the naming conventions already in place for other `add_()` functions.
363363
* `add_ribbons()` now shows points (instead of fill) on hover.
364364

365365
# 4.4.5 -- 19 September 2016

R/add.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ add_data <- function(p, data = NULL) {
3535
#' @seealso [plot_ly()]
3636
#' @references \url{https://plotly-r.com/overview.html}
3737
#'
38-
#' \url{https://plot.ly/r}
38+
#' \url{https://plotly.com/r/}
3939
#'
40-
#' \url{https://plot.ly/r/reference/}
40+
#' \url{https://plotly.com/r/reference/}
4141
#' @author Carson Sievert
4242
#' @export
4343
#' @rdname add_trace

R/deprecated.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ get_figure <- function(username, id) {
4848
#'
4949
#' @description This function is now deprecated. It used to provide a way to store plotly
5050
#' account credentials, but that can now be done with environment variables.
51-
#' For more details and examples, see \url{https://plot.ly/r/getting-started/}.
51+
#' For more details and examples, see \url{https://plotly.com/r/getting-started/}.
5252
#'
5353
#' If you're here looking for an intro/overview of the package, see the
5454
#' \href{https://github.com/ropensci/plotly/#getting-started}{readme}

R/ggplotly.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#' @param ... arguments passed onto methods.
3333
#' @export
3434
#' @author Carson Sievert
35-
#' @references \url{https://plot.ly/ggplot2}
35+
#' @references \url{https://plotly.com/ggplot2/}
3636
#' @seealso [plot_ly()]
3737
#' @examples \dontrun{
3838
#' # simple example
@@ -431,8 +431,8 @@ gg2list <- function(p, width = NULL, height = NULL,
431431

432432
# Allow thematic to add new defaults to the plot object based on it's theme
433433
built <- if (isNamespaceLoaded("thematic")) {
434-
ggthematic_build <- getFromNamespace("ggthematic_build", "thematic")
435-
ggthematic_build(p, ggplotly_build, thematic::thematic_get_theme(resolve = TRUE))
434+
tns <- asNamespace("thematic")
435+
tns$ggthematic_build(p, ggplotly_build, tns$thematic_get_theme(resolve = TRUE))
436436
} else {
437437
ggplotly_build(p)
438438
}
@@ -1277,7 +1277,7 @@ font_family <- function(family = "") {
12771277
if (!isNamespaceLoaded("thematic")) {
12781278
return("")
12791279
}
1280-
font <- thematic::thematic_get_option("font")
1280+
font <- asNamespace("thematic")$thematic_get_option("font", resolve = TRUE)
12811281
if (!length(font)) {
12821282
return("")
12831283
}

R/group2NA.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#' (i.e., color, fill, etc), it is more efficient to draw them as a single trace
88
#' with missing values that separate the groups (instead of multiple traces),
99
#' In this case, one should also take care to make sure
10-
#' \href{https://plot.ly/r/reference/#scatter-connectgaps}{connectgaps}
10+
#' \href{https://plotly.com/r/reference/#scatter-connectgaps}{connectgaps}
1111
#' is set to `FALSE`.
1212
#'
1313
#' @param data a data frame.
@@ -72,7 +72,7 @@ group2NA <- function(data, groupNames = "group", nested = NULL, ordered = NULL,
7272
data.table::setorderv(dt, cols = c(nested, groupNames, ordered))
7373

7474
# when connectgaps=FALSE, inserting NAs ensures each "group"
75-
# will be visually distinct https://plot.ly/r/reference/#scatter-connectgaps
75+
# will be visually distinct https://plotly.com/r/reference/#scatter-connectgaps
7676
# also, retracing is useful for creating polygon(s) via scatter trace(s)
7777
keyVars <- c(nested, groupNames)
7878
keyNum <- length(keyVars) + 1

R/helpers.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#'
33
#' @param p a plotly object
44
#' @param ... arguments are documented here
5-
#' \url{https://plot.ly/r/reference/#scatter-marker-colorbar}.
5+
#' \url{https://plotly.com/r/reference/#scatter-marker-colorbar}.
66
#' @param limits numeric vector of length 2. Set the extent of the colorbar scale.
77
#' @param which colorbar to modify? Should only be relevant for subplots with
88
#' multiple colorbars.
@@ -13,7 +13,7 @@
1313
#' p <- plot_ly(mtcars, x = ~wt, y = ~mpg, color = ~cyl)
1414
#'
1515
#' # pass any colorbar attribute --
16-
#' # https://plot.ly/r/reference/#scatter-marker-colorbar
16+
#' # https://plotly.com/r/reference/#scatter-marker-colorbar
1717
#' colorbar(p, len = 0.5)
1818
#'
1919
#' # Expand the limits of the colorbar
@@ -188,7 +188,7 @@ plotly_empty <- function(...) {
188188
#' Encode a raster object as a data URI
189189
#'
190190
#' Encode a raster object as a data URI, which is suitable for
191-
#' use with `layout()` \href{https://plot.ly/r/reference/#layout-images}{images}.
191+
#' use with `layout()` \href{https://plotly.com/r/reference/#layout-images}{images}.
192192
#' This is especially convenient for embedding raster images on a plot in
193193
#' a self-contained fashion (i.e., so they don't depend on external URL links).
194194
#'

R/layout.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#'
33
#' @param p A plotly object.
44
#' @param ... Arguments to the layout object. For documentation,
5-
#' see \url{https://plot.ly/r/reference/#Layout_and_layout_style_objects}
5+
#' see \url{https://plotly.com/r/reference/#Layout_and_layout_style_objects}
66
#' @param data A data frame to associate with this layout (optional). If not
77
#' provided, arguments are evaluated using the data frame in [plot_ly()].
88
#' @author Carson Sievert
@@ -49,7 +49,7 @@ layout.plotly <- function(p, ..., data = NULL) {
4949
#' @param start a start date/value.
5050
#' @param end an end date/value.
5151
#' @param ... these arguments are documented here
52-
#' \url{https://plot.ly/r/reference/#layout-xaxis-rangeslider}
52+
#' \url{https://plotly.com/r/reference/#layout-xaxis-rangeslider}
5353
#' @export
5454
#' @author Carson Sievert
5555
#' @examples
@@ -109,7 +109,7 @@ rangeslider <- function(p, start = NULL, end = NULL, ...) {
109109
#' config(plot_ly(), displaylogo = FALSE, collaborate = FALSE)
110110
#'
111111
#' # enable mathjax
112-
#' # see more examples at https://plot.ly/r/LaTeX/
112+
#' # see more examples at https://plotly.com/r/LaTeX/
113113
#' plot_ly(x = c(1, 2, 3, 4), y = c(1, 4, 9, 16)) %>%
114114
#' layout(title = TeX("\\text{Some mathjax: }\\alpha+\\beta x")) %>%
115115
#' config(mathjax = "cdn")

0 commit comments

Comments
 (0)