Skip to content

Releases: plotly/plotly.R

plotly 4.12.1

Choose a tag to compare

@cpsievert cpsievert released this 25 Jul 00:34
4ff1c33

Improvements

  • Completed the plot_ly() documentation for what happens when type is not
    specified (#2362).

  • Removed the dependency on the {lazyeval} package.

Bug fixes

  • Closed #2483: save_image() no longer embeds Windows file paths directly into Python source passed to reticulate, fixing static image export with Kaleido on Windows.

  • #2495: ggplotly() now keeps merged legend titles in sync with their legend entries, fixing a case where an upstream change in {rlang}'s hashing could silently reorder combined legend titles (e.g. factor(vs)<br />factor(cyl)) out of step with the entries they label.

plotly 4.12.0

Choose a tag to compare

@cpsievert cpsievert released this 24 Jan 15:52
ba96ad9

Changes to plotly.js

Upgrades plotly.js from v2.11.1 to v2.25.2 (35 releases). Key new features now available:

  • Multiple legends: Support for legend2, legend3, etc. with separate positioning and visibility control
  • Shape labels: New label attribute for shapes and label.texttemplate for parametric shapes
  • Marker direction: New marker.angle, marker.angleref, and marker.standoff properties for directional markers
  • Y-axis positioning: shift and autoshift properties to avoid y-axis overlapping in multi-axis plots
  • Mapbox clustering: Clustering options and bounds support for scattermapbox traces
  • Equal Earth projection: New map projection option for geo subplots
  • Pattern fills: Pattern support extended to pie, funnelarea, sunburst, icicle, and treemap charts
  • Editable selections: Persistent and editable selections over cartesian subplots with editSelection config option
  • Axis label aliases: labelalias for simplified axis label customization
  • Grid styling: griddash property and minor tick/grid line styling options

Also includes a security fix for prototype pollution and ~90KB bundle size reduction.

See the plotly.js releases page for the full changelog.

Improvements

  • save_image() now works with kaleido v1.0 and higher. (#2447)

Bug fixes

  • plotly_build() now works with ggmatrix objects (e.g., from GGally::ggpairs()). (#2447)
  • Closed #2415: ggplotly() now shows variables named 'group' in tooltips when mapped to aesthetics like colour.
  • Closed #2455, #2460: ggplotly() no longer creates empty shapes when panel.border is element_blank() (ggplot2 4.0.0 compatibility).
  • Closed #2466: ggplotly() no longer errors when scale_*_manual() has unused aesthetics (e.g., aesthetics = c("colour", "fill") when only colour is used).
  • Closed #2305: ggplotly() now respects geom_boxplot(outlier.shape = NA) to hide outlier points.
  • Closed #2467: ggplotly() now correctly shows legends and splits traces when scales have multiple aesthetics.
  • Closed #2407, #2187: ggplotly() now translates legend.position theme element to plotly layout (supports "bottom", "top", "left", and numeric positions).
  • Closed #2281: ggplotly() no longer drops legends when geom_blank() is present in the plot.

plotly 4.11.0

Choose a tag to compare

@cpsievert cpsievert released this 19 Jun 20:24
e04eb4f

New features

  • ggplotly() now supports the {ggridges} package. (#2314)

Improvements

Bug fixes

  • Closed #2337: Creating a new event_data() handler no longer causes a spurious reactive update of existing event_data()s. (#2339)
  • Closed #2376: Removes errant boxmode warning for grouped boxplot. (#2396)
  • Closed #2392: Trivial warning about RColorBrewer minimal n value is no longer thrown (#1999)

plotly 4.10.4

Choose a tag to compare

@cpsievert cpsievert released this 14 Jan 17:10
0445ed9

Improvements

  • ggplotly() now works better with the development version of ggplot2 (> v3.4.4). (#2315)

plotly 4.10.3

Choose a tag to compare

@cpsievert cpsievert released this 22 Oct 16:34
3c158b1

Improvements

  • ggplotly() now works better with the development version of ggplot2 (> v3.4.3). (#2301)

Bug fixes

  • Closed #1947: ggplotly() now correctly handles geom_vline/geom_hline with empty data. Previously, if geom_vline/geom_hline was passed an empty data frame, it would result in an error. The plot is drawn even if no lines are found; this is the same behavior as ggplot2.

  • Closed #1214: Do not warn in RStudio on Windows when scattergl is used. Recent RStudio versions can render scattergl correctly.

  • Closed #2298: Fix fill assignment in geom_point when a single shape value was used with multiple fill and colour values mapped (@zeehio)

plotly 4.10.2

Choose a tag to compare

@cpsievert cpsievert released this 03 Jun 16:50
7c6e6d8

New features

  • Closed #2216: Additional selectize.js options can now be passed along to highlight()'s selectize argument. (#2217)

Improvements

  • Closed #2259: ggplotly() now provides better support for ggplot2 >v3.4.2. (#2262)

Bug fixes

  • Closed #2212: ggplotly() no longer silently drops legends that are customized through ggplot2::guide_legend().
  • Closed #2179: save_image() no longer needs reticulate::py_run_string("import sys") in order to run without error. (#2179)
  • Closed #2218: highlight(selectize = TRUE) no longer yields an incorrect selectize.js result when there is a combination of crosstalk and non-crosstalk traces. (#2217)
  • Closed #2208: ggplotly() no longer errors given a geom_area() with 1 or less data points (error introduced by new behavior in ggplot2 v3.4.0). (#2209)
  • Closed #2220: ggplotly() no longer errors on stat_summary(geom = "crossbar"). (#2222)
  • Closed #2212: ggplotly() no longer removes legends when setting guide properties via guides(aes = guide_xxx(...)).

plotly 4.10.1

Choose a tag to compare

@cpsievert cpsievert released this 07 Nov 15:25

Changes to plotly.js

  • This version of the R package upgrades the version of the underlying plotly.js library from v2.5.1 to v2.11.1. This includes many bug fixes and improvements. The plotly.js release page has the full list of changes.

New features

  • plotlyOutput() gains a new fill parameter. When TRUE (the default), the widget's container element is allowed to grow/shrink to fit it's parent container so long as that parent is opinionated about its height and has been marked with htmltools::bindFillRole(x, container = TRUE). (#2198)
  • ggplotly() now supports the {ggalluvial} package. (#2061, thanks @moutikabdessabour)
  • highlight() now supports on="plotly_selecting", enabling client-side linked brushing via mouse click+drag (no mouse-up event required, as with on="plotly_selected"). (#1280)
  • raster2uri() supports nativeRaster objects. This enables nativeRaster support for
    the annotation_raster() geom (#2174, @zeehio).

Bug fixes

  • ggplotly() now converts stat_ecdf() properly. (#2065)
  • ggplotly() now correctly handles geom_tile() with no fill aesthetic. (#2063)
  • ggplotly() now respects guide(aes = "none") (e.g., guide(fill = "none")) when constructing legend entries. (#2067)
  • Fixed an issue with translating GGally::ggcorr() via ggplotly(). (#2012)
  • Fixed an issue where clearing a crosstalk filter would raise an error in the JS console (#2087)
  • Fixed an issue where map_color() would throw an error on R 4.2 (#2131)

Improvements

  • ggplotly() does not issue warnings with options(warnPartialMatchArgs = TRUE) any longer. (#2046, thanks @bersbersbers)
  • ggplotly() does not issue warnings related to use of deprecated tidyr::gather_() in internals. (#2125, thanks @simonpcouch)

plotly 4.10.0

Choose a tag to compare

@cpsievert cpsievert released this 12 Oct 13:52

Breaking changes in JavaScript API

  • This version of the R package upgrades the version of the underlying plotly.js library from v1.57.1 to v2.5.1. This includes many breaking changes, bug fixes, and improvements to the underlying JavaScript library. Most of the breaking changes are summarized in this announcement of the 2.0 release, but see here for the full changelog.

Breaking changes in R API

  • ggplotly() now uses the layout.legend.title (instead of layout.annotations) plotly.js API to convert guides for discrete scales. (#1961)
  • renderPlotly() now uses Plotly.react() (instead of Plotly.newPlot()) to redraw when layout(transition = ) is specified. This makes it possible/easier to implement a smooth transitions when renderPlotly() gets re-executed. (#2001)

New Features

  • Added new functions for static image exporting via the kaleido python package, namely save_image() and kaleido(). See help(save_image, package = "plotly") for installation info and example usage. (#1971)

Improvements

  • ggplotly() now better positions axis titles for facet_wrap()/facet_grid(). (#1975)

plotly 4.9.4.1

Choose a tag to compare

@cpsievert cpsievert released this 21 Jun 18:04
bb98fef
  • Fixes a bug in ggplotly() with {crosstalk} and {ggplot2} v3.3.4 (#1952).

plotly 4.9.4

Choose a tag to compare

@cpsievert cpsievert released this 08 Jun 18:38
9fe33eb

BUG FIXES

  • Duplicate highlight(selectize=T) dropdowns are no longer rendered in Shiny (#1936).
  • group_by.plotly() now properly retains crosstalk information across {dplyr} versions (#1920).
  • Adds fixes in ggplotly() for the upcoming {ggplot2} >3.3.3 release (#1952).
  • Fixes some issues with name and frames when both attributes are specified. (#1903 and #1618).