ggplotly() now supports the{ggridges}package. (#2314)ggplotly() to better support recentversions of ggplot2. (#2315, #2368, #2442, thanksevent_data() handler nolonger causes a spurious reactive update of existingevent_data()s. (#2339)ggplotly() now works better with the developmentversion of ggplot2 (> v3.4.4). (#2315)ggplotly() now works better with the developmentversion of ggplot2 (> v3.4.3). (#2301)Closed #1947:ggplotly() now correctly handlesgeom_vline/geom_hline with empty data.Previously, ifgeom_vline/geom_hline waspassed an empty data frame, it would result in an error. The plot isdrawn even if no lines are found; this is the same behavior asggplot2.
Closed #1214: Do not warn in RStudio on Windows when scattergl isused. Recent RStudio versions can render scattergl correctly.
Closed #2298: Fix fill assignment in geom_point when a singleshape value was used with multiple fill and colour values mapped (
highlight()’sselectize argument.(#2217)ggplotly() now provides better supportfor ggplot2 >v3.4.2. (#2262)ggplotly() no longer silently dropslegends that are customized throughggplot2::guide_legend().save_image() no longer needsreticulate::py_run_string("import sys") in order to runwithout error. (#2179)highlight(selectize = TRUE) no longeryields an incorrect selectize.js result when there is a combination ofcrosstalk and non-crosstalk traces. (#2217)ggplotly() no longer errors given ageom_area() with 1 or less data points (error introduced bynew behavior in ggplot2 v3.4.0). (#2209)ggplotly() no longer errors onstat_summary(geom = "crossbar"). (#2222)ggplotly() no longer removes legends whensetting guide properties viaguides(aes = guide_xxx(...)).plotlyOutput() gains a newfill parameter.WhenTRUE (the default), the widget’s container element isallowed to grow/shrink to fit it’s parent container so long as thatparent is opinionated about its height and has been marked withhtmltools::bindFillRole(x, container = TRUE). (#2198)bslib::card_body_fill()ggplotly() now supports the{ggalluvial}package. (#2061, thankshighlight() now supportson="plotly_selecting", enabling client-side linked brushingvia mouse click+drag (no mouse-up event required, as withon="plotly_selected"). (#1280)raster2uri() supports nativeRaster objects. Thisenables nativeRaster support for theannotation_raster()geom (#2174,ggplotly() now convertsstat_ecdf()properly. (#2065)ggplotly() now correctly handlesgeom_tile() with nofill aesthetic.(#2063)ggplotly() now respectsguide(aes = "none") (e.g.,guide(fill = "none")) when constructing legend entries.(#2067)GGally::ggcorr() viaggplotly(). (#2012)map_color() would throw an erroron R 4.2 (#2131)ggplotly() does not issue warnings withoptions(warnPartialMatchArgs = TRUE) any longer. (#2046,thanksggplotly() does not issue warnings related to use ofdeprecatedtidyr::gather_() in internals. (#2125, thanksggplotly() now uses thelayout.legend.title (instead oflayout.annotations) plotly.js API to convert guides fordiscrete scales. (#1961)renderPlotly() now usesPlotly.react()(instead ofPlotly.newPlot()) to redraw whenlayout(transition = ) is specified. This makes itpossible/easier to implement a smooth transitions whenrenderPlotly() gets re-executed. (#2001)save_image() andkaleido(). Seehelp(save_image, package = "plotly") for installation infoand example usage. (#1971)ggplotly() now better positions axis titles forfacet_wrap()/facet_grid(). (#1975)ggplotly() with{crosstalk}and{ggplot2} v3.3.4 (#1952).highlight(selectize=T) dropdowns are nolonger rendered in Shiny (#1936).group_by.plotly() now properly retains crosstalkinformation across{dplyr} versions (#1920).ggplotly() for the upcoming{ggplot2} v3.3.4 release (#1952).name andframeswhen both attributes are specified. (#1903 and #1618).renderPlotly() now works well withshiny::bindCache(), meaning that plotly graphs can now bepersistently cached in Shiny apps withrenderPlotly(expr) %>% shiny::bindCache()(#1879).
ggplotly() now works well with thethematicpackage. That is, it can now correctly translateggplot2 styling that derives fromthematic. Note that, in order to usethematic’s auto theming in Shiny withggplotly(), you needshiny v1.5.0 (orhigher) andhtmlwidgets v1.5.2.9000 (or higher).Relatedly, if these versions are available, one may now also callgetCurrentOutputInfo() insiderenderPlotly()to get CSS styles of the output container (#1801 and #1802).
All HTTP requests are now retried upon failure (#1656,
R linebreaks (\n) infactor labels are nowtranslated to HTML linebreaks (<br />), too. Before,this conversion was only done for colums of type character. (#1700,
When R’sPOSIXt class is serialized to JSON, thetime of day is now correctly preserved (in plotly.js expected'yyyy-mm-dd HH:MM:SS.ssssss' format). This should fix awhole host of issues where date-times were being rounded. (#1871,
ggplotly() now handles discrete axes of afacet_wrap andfacet_grid correctly when thereis only one category in panels > 1 (#1577 and #1720).
ggplotly() now correctly accounts for linebreaks intick label text when computing plot margins (#1791,
ggplotly() now handleselement_blank()andfactor() labels in positional scales correctly (#1731and #1772).
ggplotly() now handles missingyaesthetic ingeom_errorbar() (#1779,
This is minor patch release with a few minor bug fixes and updatestest expectations in anticipation of new R 4.0 defaults.
ggplotly() bug in axis tick translation (#1725,#1721).plot_mapbox() now correctly defaults to a scattermapboxtrace (unless z is present, then it defaults to choroplethmapbox)(#1707).ggplotly() now correctly resolves overlapping axis ticktext incoord_sf() (#1673).toWebGL() (#1569).treemap andimage. Theplotly.js releasepage has the full list of changes.add_image() function was added to make it easier tocreate image traces viaraster objects.add_sf()/geom_sf() now correctly handlegeometry columns that are named something other than"geometry" (#1659).event_data() gains support for theplotly_sunburstclick event (#1648)renderPlotly() (#1528).ggplotly() now positions the x-axis in the last columnof afacet_wrap() properly (#1501).ggplotly() now handlesgeom_hline()/geom_vline() correctly inconjunction withcoord_flip() (#1519).event_data() now correctly relays thekeyattribute for statistical traces (#1610).sunburst,waterfall,isosurface.hovertemplate attribute allows for finer-tunedcontrol over tooltip text. Seeherefor an example.title is now deprecated (butstill works). Instead, usetitle = list(text = "title").This change was made to support a new title placement API (e.g.,title = list(text = "title", xanchor = "left")). Note thatthese changes are relevant forlayout.title as well aslayout.xaxis.title/layout.yaxis.title/etc.event argument of theevent_data()function now supports the following events:plotly_selecting,plotly_brushed,plotly_brushing,plotly_restyle,plotly_legendclick,plotly_legenddoubleclick,plotly_clickannotation,plotly_afterplot,plotly_doubleclick,plotly_deselect,plotly_unhover. For examples, seeplotly_example("shiny", "event_data"),plotly_example("shiny", "event_data_legends"), andplotly_example("shiny", "event_data_annotation"),event_register() andevent_unregister() functions for declaring which events totransmit over the wire (i.e., from the browser to the shiny server).Events that are likely to have large overhead are not registered bydefault, so you’ll need to register these:plotly_selecting,plotly_unhover,plotly_restyle,plotly_legendclick, andplotly_legenddoubleclick.priority argument. By settingpriority='event', theevent is treated like atrue event: any reactive expression using theevent becomesinvalidated (regardless of whether the input values has changed). For anexample, seeplotly_example("shiny", "event_priority").event_data() function now relays the (officialplotly.js)customdata attribute in similar fashion to(unofficial)key attribute (#1423). Runplotly_example("shiny", "event_data") for an example.event_data("plotly_selected") is no longer too eager toclear. That is, it is no longer set toNULL when clickingon a plotafter triggering the “plotly_selected” event (#1121)(#1122).orca() function now supports conversion of muchlarger figures (#1322) and works without a mapbox api token(#1314).orca_serve() function was added for efficientexporting of many plotly graphs. For examples, seehelp(orca_serve).orca() function gains new argumentsmore_args and... for finer control over theunderlying system commands.ggplotly() now respects horizontal alignment ofggplot2 titles (e.g.,ggplotly(qplot(1:10) + ggtitle("A title") + theme(plot.title = element_text(hjust = 1)))).saveRDS() to save an object as an rds file and restore iton another machine withreadRDS()). Note this object isdynamically linked to JavaScript libraries, so one should takecare to use consistent versions ofplotly whenserializing and unserializing (#1376).style() function now supports “partial updates”(i.e. modification of a particular property of an object, rather thanthe entire object). For example, notice how the first plot retains theoriginal marker shape (a square):p <- plot_ly(x = 1:10, y = 1:10, symbol = I(15)); subplot(style(p, marker.color = "red"), style(p, marker = list(color = "red")))(#1342).method argument ofplotlyProxyInvoke()gains support for a"reconfig" method. This makes itpossible to modify just the configuration of a plot in ashiny app. For an example use, seeplotly_example("shiny", "event_data_annotation").plotly_example() function will now attempt to openthe source file(s) used to run the example. Setedit = FALSE to prevent the source file(s) fromopening.config().stroke is specified,span now defaultstoI(1). This results in a slightly narrower default spanfor some trace types (e.g.,box,contour), butit also ensures thestroke is always visible when it’srelevant(e.g. plot_ly(x = 1:10, y = 1:10, stroke = I("black"))),making for a more consistent overall default (#1507).config() function no longer has acollaborate argument.cloud argument is now deprecated and will beremoved in a future version. UseshowSendToCloudinstead.ggplotly() now translates title information tolayout.title.text (instead oflayout.title)andlayout.title.font (instead oflayout.titlefont)subplot() now works much better with annotations,images, and shapes:xref/yref references an x/y axisthese references are bumped accordingly (#1181).xref/yref references papercoordinates, these coordinates are updated accordingly (#1332).subplot() now repositions shapes with fixedheight/width (i.e.,xsizemode/ysizemode of"pixel") correctly (#1494).colorscale attribute now correctly handles a widerrange of input values (#1432, #1485)color argument inplot_ly() now uses an evenly spaced grid of values insteadof quantiles (#1308).size argument maps tomarker.size, it now converts to an array of appropriatelength (#1479).color andstroke arguments now work asexpected for trace types withfillcolor but nofill attribute (e.g. box traces) (#1292).event_data() for heatmapswith atomic vectors forx/y/z isnow correct (#1141).marker objects(#1351).ggplotly() colorbar would cause issueswith hover behavior, which is now fixed (#1381).text attribute is no longer collapsed to a stringwhenhoveron='fills+points' (#1448).layout.[x-y]axis.domain is no longer supplied a defaultwhenlayout.grid is specified (#1427).api_create(), layout attributes are no longer incorrectlysrc-ified, which was causing inconsistencies in local/remote renderingofggplotly() charts (#1197).plot_ly() specific improvementsscattergl to make it nearlyfeature complete withscatter, localization of textrendering (i.e., international translations), and six new trace types(cone,scatterpolar,scatterpolargl,splom,table,&violin)! Seehere for acomplete list of plotly.js-specific improvements.plot_ly(),plot_mapbox(), andplot_geo() (via the newadd_sf() function).Seethisblog post for an overview.stroke,strokes,alpha_stroke,span, andspans). For an overview, see thesf blog post linked to in the bullet point above andthe new package demos (list all demos withdemo(package = "plotly")).ggplotly() specificimprovementsggplotly() now supports conversion ofggplot2’sgeom_sf().ggplotly() about the relevantshiny output size viasession$clientData.This ensuresggplotly() sizing is closer toggplot2 sizing, even on window resize. For an example,runplotly_example("shiny", "ggplotly_sizing").TeX() function may be used to flag a character vector asLaTeX (#375). Use the newmathjax argument inconfig() to specify either external(mathjax="cdn") or local (mathjax="local")MathJaX. If"cdn", mathjax is loaded externally (meaning aninternet connection is needed for TeX rendering). If"local", the PLOTLY_MATHJAX_PATH environment variable mustbe set to the location (a local file path) of MathJax. IMPORTANT:plotly uses SVG-based mathjax rendering which doesn’tplay nicely with HTML-based rendering (e.g.,rmarkdowndocuments andshiny apps). To leverage both types ofrendering, you must<iframe> your plotly graph(s)into the larger document (seeherefor anrmarkdown example andherefor ashiny example).persistent = TRUE inhighlight(), butpersistent = FALSE (the default) is now recommended sinceit allows one to switch betweenpersistent/transientselection in the browser, rather than at the command line.highlight() function gains adebounceargument for throttling the rate at whichon events may befired. This is mainly useful for improving user experience whenhighlight(on = "plotly_hover") and mousing over relevantmarkers at a rapid rate (#1277)partial_bundle() function makes it easy toleveragepartialbundles of plotly.js for reduced file sizes and faster rendertimes.config() function gains alocaleargument for easily changing localization defaults (#1270). This makesit possible localize date axes, and in some cases, modebar buttons(#1270).plot_geo() function gains aofflineargument for rendering"scattergeo" traces with or withoutan internet connection (#356). Leveraging this argument requires the newplotlyGeoAssets package.plotly_example("shiny", "async").ggplotly(NULL, "message") andplotly_build(NULL, "message") now returnshtmltools::div("message"), making it easier to relaymessages in shiny when data isn’t yet ready to plot (#1116).animation_button() function gains alabel argument, making it easier to control the label of ananimation button generated through theframe API(#1205).highlight_key() function provides a wrapperaroundcrosstalk::SharedData$new(), making it easier toteach others how to leverageSharedData objects withplotly andcrosstalk.plot_ly() specificchangesname attribute is now a “specialplot_ly() argument” and behaves similar tosplit (it ensures a different trace for every unique valuesupplied). Although this leads to a breaking change (namewas previously appended to an automatically generated trace name), itleads to a more flexible and transparent API. Those that wish to havethe old behavior back should provide relevant mappings to thename attributes(e.g. plot_ly(mtcars, x = ~wt, y = ~mpg, color = ~factor(vs), name = "a")should becomeplot_ly(mtcars, x = ~wt, y = ~mpg, color = ~factor(vs), name = ~paste(vs, "\na")))color argument now maps tofillcolor,making it much easier to use polygon fills to encode data values (e.g.,choropleth maps). For backwards-compatibilty reasons, whencolor maps tofillcolor,alphadefaults to 0.5 (instead of 1). For an example,plot_mapbox(mn_res, color = ~INDRESNAME) orplot_mapbox(mn_res, split = ~INDRESNAME, color = ~AREA, showlegend = FALSE, stroke = I("black")).color argument no longer automatically add"markers" to themode attribute forscatter/scattergl trace types. Those who wish to have the old behaviorback, should add"markers" to themodeexplicity (e.g., changeplot_ly(economics, x = ~pce, y = ~pop, color = ~as.numeric(date), mode = "lines")toplot_ly(economics, x = ~pce, y = ~pop, color = ~as.numeric(date), mode = "lines+markers")).size argument now informs a defaulterror_[x/y].width(andspan informserror_[x/y].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))).layout.showlegend now defaults toTRUE forasingle pie trace. This is a more sensible default and matchespure plotly.js behavior.automargin = TRUE. Themajority of the time this should make axis labels more readable, but mayhave un-intended consequences in some rare cases (#1252).elementId field is no longer populated, which fixesthe “Ignoring explicitly provided widget ID” warning in shinyapplications (#985).ggplotly() specificfixesheight/width thatggplotly() assumes is now more consistently correct invarious context, but it also now requires access to one of the followingdevices:Cairo::Cairo(),png(), orjpg().ggplotly() was ignoring a specifiedheight/width (#1190).ggplotly() now uses fixed heights for facet stripsmeaning that their height is still correct after a window resize(#1265).plot_ly() specificfixeslimits argument ofcolorbar() wasn’tbeing applied toline.color/line.cmin/line.cmax(#1236).legendgroup can now properly map data values(#1148).marker.size) are nowalways based on the area whenmarker.sizemode='area' (which is the default sizemode whenusing thesize argument). Previously, traces with one justone value supplied tomarker.size were being sized by theirdiameter (#1133).height/width viashinyreactive values, is now correct (#1068).add_*() no longer inheritscrosstalk::SharedData key information wheninherit = FALSE (#1242).plotlyProxy() andplotlyProxyInvoke()functions. For examples, seeplotly_example("shiny", "proxy_relayout") andplotly_example("shiny", "proxy_mapbox"). Closes #580.plotly_example() function to make it easierto run shiny/rmarkdown examples included with the package under theinst/examples directory.schema() function now returns the plot schema(rather just printing it), making it easier to acquire/use values fromthe official plot schema. Seehelp(schema) for an example.Fixes #1038.ggplotly() is no longer fixed tothe device size inside RStudio. Fixes #1033.ArrayBuffer.isView(), which should fixrendering issues on plaforms that don’t have a typed array polyfill(e.g., RStudio on Windows). Fixes #1055.event_data("plotly_relayout") no longer firesNULL for any event. Fixes #1039.color withscattermapbox/scattergeo. Fixes #1038.marker.color as an array. Fixes #1084.coord_equal(),coord_fixed(),coord_map(),coord_quickmap()).geom_sf() andcoord_sf().group2NA() function is nowexported and its performance has been greatly improved thanks to the newdata.table dependency. Essentially any geom conversionthat reduces to a polygon/path should see speed improvements. Similarly,anyplot_ly() graph that usegroup_by() inconjunction withadd_lines(),add_paths(),add_segments(), etc will also see improvements, especiallywhen there is a large number of groups. For details on the speedimprovements, see #1022 and #996 (thanksapi_create() function gains a newfileopt argument, which is inspired from thefileopt argument in the (deprecated)plotly_POST() function (fixes #976). It currently supportsto values:"new" and"overwrite". The default,"overwrite", will overwrite existing file(s) with amatchingfilename.filename argument inapi_create() nowaccepts a character vector of length 2, the first string is used to namethe plot, and the second is used to name the grid (i.e., data behind theplot).traces argument in thestyle()function now defaults toNULL (instead of 1). Meaning that,by default, supplied attributes now modifyevery trace (insteadof the first one).coord_flip() (fixes#1012).api_create()), boththe plot and the data behind the plot are private (fixes #976).api_create()) no longer creates multiple grids (fixes#1004).api_create() function should now create gridreferences for all data array attributes (fixes #1014).ggplotly() no longer opens an (off-screen) graphicsdevice in RStudio for sizing. It will now correctly use the size of theviewer panel when querying the size of the graphics device.NULL for pie charts(fixes #1002)demo(package = "plotly"). For a more comprehensiveoverview, seehttps://plotly-r.com/client-side-linking.html. For somemore complex examples, seehttps://pedestrians.cpsievert.me/highlight() function for configuringselection modes/sequences/options.help(animation). For a morethorough overview, seehttps://plotly-r.com/animating-views.htmlframe argument toplot_ly() forcreating animations. Also added theanimation_opts(),animation_slider(), andanimation_button()functions for configuring animation defaults.plotly_POST()andget_figure() functions obsolete (useapi_create() andapi_download_plot() instead),and thus, are now deprecated, but remain around forbackwards-compatibility. For more details, seehelp(api).ggplotly():GeomCol,GeomRug,GeomCrossbar,GeomQuantile,GeomSpoke,GeomDotplot,GeomRasterAnn (i.e.,annotation_raster()), andGeomAnnotationMap (i.e.,annotation_map()).raster2uri() which makes it easierto embed raster objects asimages via dataURIs. For examples, seehelp(raster2uri).ggplotly() gains a new argument,dynamicTicks, which allows axis ticks to update uponzoom/pan interactions (fixes #485).plot_dendro() function for a quick and dirtyinteractive dendrogram with support for hierarchial selection. For more,see –https://plotly-r.com/client-side-linking.html#fig:dendroexport() function gains aseleniumargument for rendering/exporting WebGL plots and exporting to‘svg’/‘webp’ file formats (via the plotly.js functionPlotly.downloadImage()).legendgroup (see #675, #817, #826).plotlyOutput() function gains ainlineargument which makes it easier to place multiple plots in the same row(in a shiny application).ggplotly() now appliesformat() toautomatically generated hoverinfo. This will allow for finer controlover the text displayed (for instance,options(digits = 4)can now be used to choose the number of significant digits used). See#834 for an example.HTMLwidgets.renderValue() should now avoid creating toomany active WebGL contexts (thanksremove_typedarray_polyfill() was added to make it easy toremove it. Fixes #824, #717, #825.ggplotly() nowtries to open/close a Cairo graphics device, then a bitmap (png/jpeg)device. If neither is available, it errors. This helps to ensure that ascreen device is never opened byggplotly() (whichfixes #829). Furthermore, ifwidth/height isnot specifiedand no graphics device is currently open, adefault of 640/480 is used for width/height of the device.geom_bar(),geom_histogram(),geom_col()). Fixes #560,#874, #901, #831.geom_bar() viaggplotly(). Fixes #557 and#662.embed_notebook() now works innteractnotebooks (see #768).ggplotly()). Fixes #804.ggplotly()). Fixes #861.timezone argument inggplot2’sscale_datetime(). Fixes (#743,thanksp,doconfig(p, modeBarButtonsToRemove = "Collaborate")layout() is now deprecated.Specify inggplotly() orplot_ly().ggplotly() function now preserves all informationabout the layer mapping. This makes it possible to access input/outputdata from any layer.layout.width/layout.height.height/width are specified inggplotly(), relative sizes are now translated correctly.Fixes #489 and #510.ggplotly() on a plot withgeom_line andgroup aesthetic wrong tooltipinformation was shown. Fixes #774.colors argument.colorbar() function gains a newlimitsarguments for controlling the colorscale limits.z is now required inadd_heatmap(). Ifyou want az to be computed, useadd_histogram().split, replaces the old functionalityof the now deprecatedgroup argument by creating one traceper value.subplot() without a specified color(once again) match the coloring defaults supplied by plotly.js (see#724).subplot()colorbar() function now works on colorbarsgenerated viaz mapping.plot_mapbox() andplot_geo()functions, which make it easier to work with the “scattermapbox”,“scattergeo”, and “choropleth” trace types. See the maps chapter of theplotly book for some examples –https://plotly-r.com/maps.htmlsubplot() now accepts, and correctly scales mapboxobjects.add_mesh3d() andadd_pie()functions as wrappers around the “mesh3d”, and “pie” trace types.add_scattergeo() andadd_choropleth()functions have been deprecated in favor ofplot_geo().add_area(...) function changed it’s meaning fromadd_lines(..., fill = 'tozeroy') to a wrapper around thearea tracehttps://plotly.com/r/reference/#area. This is moreconsistent with the naming conventions already in place for otheradd_() functions.add_ribbons() now shows points (instead of fill) onhover.rangeslider() function to make it easier to adda range slider to the x-axis.colorbar() function to make it easier to modifyan automatically generated colorbar.plot_ly(mpg, x = ~cty, y = ~hwy, symbol = ~factor(cyl), color = ~factor(cyl)))inherit argument for alladd_()functions to avoid inheriting attributes fromplot_ly().add_fun() function to add layers to a plotwithout modifying the original data associated with a plotlyobject.add_annotations() function to make it easierto add annotations.layerData argument toggplotly()to make it possible to retrieve the data from a particularggplot2 layer.marker.line.color is now transparent by default.marker.colorbar.add_choropleth() previously wasn’t relaying thez attribute.add_segments() (resulting in incorrect axis categoryorder).plot_ly() when the number of traces isa multiple of ten.event_data() now works inside shiny modules (#659). Foran example, seehttps://github.com/plotly/plotly.R/tree/master/inst/examples/shiny/event_data_modulesadd_bars().as_widget() function was exported to makeit easier to convert a list (adhering to the plotly spec) to a plotlyhtmlwidget object. This should only be needed when “manually” editingthe underlying list object.plotlyOutput(). In order to make this possible,ggplotly() now has a method for plotly objects (theidentity function), andggplotly() called on any expressionprovided toplotlyOutput().geom_text().last_plot() can now be used to retrievethe most recentlyprinted plotly graph. Thanks to this newfeature, whenplotly_POST() is called with no plotly objectsupplied, the most recentlyprinted plotly graph is sent to theusers plotly account.colors/symbols/linetypesarguments now acceptnamed character vectors. The names specifythe domain (i.e., data values) and the values specify the range (i.e.,visual encodings). This is mainly useful to ensure a particular(discrete) data value is mapped to a particular visual attribute (yes,this is similar, in spirit, to ggplot2’sscale_*_manual()).scales::shape_pal() andscales::linetype_pal().color/symbol/linetype, domainvalues are sorted alphabetically before scales are applied. Also, whenmapping a factor tocolor/symbol/linetype, domainvalues are sorted according to their factor levels before scales areapplied. This leads to more consistent (categorical axis orderingbehaves similarly) and predictable (compared to having values sorted inthe order in which they appear) behavior.alpha is now applied whencolor isn’tspecified (fixes #658).plot_ly() now orders the categories of a discrete x/yaxis according the level ordering (if a factor) or alphabetical order(if a character string). Fixes #578.ggplotly() gains a neworiginalDataargument which allows one to attach either the original (global) data,or a “scaled”/“trained” version of the data used byggplot2 to draw the graph (for a quick example,ggplotly(qplot(1:10), originalData = FALSE) %>% plotly_data()).geom_polygon()/geom_hex()/geom_rect()/geom_map()).stat_identity() is used, group domain values arepreserved and displayed in hoverinfo.hide_guides()/hide_legend()were added (these work similarly to the existinghide_colorbar()) to simply the hiding of guides (i.e.,legends/colorbars).facet_wrap() should now becorrect.plot_ly(mtcars, x = wt, y = mpg, color = vs) should now beplot_ly(mtcars, x = ~wt, y = ~mpg, color = ~vs). This is amajor breaking change, but it is necessary to ensure that evaluation iscorrect in all contexts (as a result,evaluate argument isnow deprecated as it is no longer needed). It also has the benefit ofbeing easier to program with (i.e., writing your own custom functionsthat wrapplot_ly()) since it preservesreferentialtransparency. For more details, see thelazyevalvignetteas.widget()function has deprecated, andserialization/memoryleak problems are no longer an issue. This change also implies thatarbitrary data manipulation functions can no longer be intermingledinside a plot pipeline, but plotly methods for dplyr’s data manipulationverbs are now provided (see?plotly_data forexamples).group variable mapping no longer create multipletraces, but instead defines “gaps” within a trace (fixes #418, #381,#577). Groupings should be declared via the newgroup_by()function (seehelp(plotly_data) for examples) instead ofthegroup argument (which is now deprecated).plot_ly() nowinitializes a plotly object(i.e., won’t add a scatter trace by default), meaning that somethinglikeplot_ly(x = 1:10, y = 1:10) %>% add_trace(y = 10:1)creates one trace, instead of two. That being said, if you manuallyspecify a trace type inplot_ly(), it will add a layer withthat trace type(e.g. plot_ly(x = 1:10, y = 1:10, type = "scatter") %>% add_trace(y = 10:1)draws two scatter traces). If no trace type is provided, a sensible typeis inferred from the supplied data, and automatically added (i.e.,plot_ly(x = rnorm(100)) now creates a histogram).inherit argument is deprecated. Anyarguments/attributes specified inplot_ly() willautomatically be passed along to additional traces added viaadd_trace() (or any of it’sadd_*()siblings).color,symbol,size) is applied at the plot-level, instead of the tracelevel.linetype/linetypes arguments formapping discrete variables to line types (works very much like thesymbol/symbols).I() (closes#428). This is mainly useful for changing default appearance(e.g. plot_ly(x = 1:10, y = 1:10, color = I("red"))).pch andlty values(e.g. plot_ly(x = 1:25, y = 1:25, symbol = I(0:24)))alpha argument controls the alpha transparency ofcolor(e.g. plot_ly(x = 1:10, y = 1:10, color = I("red"), alpha = 0.1)).sizes argument for controlling the range ofmarker size scaling.add_polygons()/add_ribbons()/add_area()/add_segments()/add_lines()/add_markers()/add_paths()/add_text()functions provide a shorthand for common special cases ofadd_trace().toWebGL() function for easy conversion from SVG toWebGL.export() function makes it easy to save plots aspng/jpeg/pdf (fixes #311).plotly_data() function for returning/inspectingdata frame(s) associated with a plotly object.plotly_json() function for inspecting the data sentto plotly.js (as an R list or JSON).layout() is now a generic function and uses methoddispatch to avoid conflicts withgraphics::layout() (fixes#464).3.6.5 – 10 June 2016
IMPROVEMENT:
Multiple rows of facet strips will now be separated by
(i.e.,line breaks) instead of ,. See #593.
3.6.4 – 31 May 2016
BUG FIX:
embed_notebook() will no longer use a ‘.embed’ extension in theiframe src attribute. See #613.
3.6.3 – 24 May 2016
CHANGES:
Provided a better way of reexporting magrittr::%>%.See #597.
3.6.2 – 24 May 2016
CHANGES:
Removed unnecessary plyr dependency.
3.6.1 – 23 May 2016
BUG FIX:
Add a default method for plotly_build. Fixes #592.
3.6.0 – 16 May 2016
NEW FEATURES & CHANGES:
vignette("subplot").BUG FIX:
Column facet strips will no longer be drawn when there is only onecolumn.
3.5.7 – 13 May 2016
CHANGES:
Better defaults for defaultWidth/defaultHeight in the htmlwidget’ssizing policy.
BUG FIX:
Pass knitr options to the named argument options. Fixes #582.
3.5.6 – 12 May 2016
BUG FIX:
Use .embed suffix in iframe src attribute. Fixes #581.
3.5.5 – 5 May 2016
CHANGES:
ggplotly() will now use plotly’s layout.axisid.title (instead oflayout.annotations) for axis titles on non-faceted plots. This will makefor a better title placement experience (see #510).
BUG FIX:
Space for interior facet_wrap() strips are now accounted for.
3.5.4 – 5 May 2016
BUG FIX:
gg2list() now returns an object of class “plotly_built” instead of“plotly” to ensure a sensible print method is invoked.
3.5.3 – 3 May 2016
CHANGES:
Upgrade to plotlyjs v1.10.1 –https://github.com/plotly/plotly.js/releases/tag/v1.10.1
3.5.2 – 2 May 2016
BUG FIX:
Added missing key properties in ggplotly() converter so selectionscan be accessible via event_data().
3.5.1 – 26 Apr 2016
CHANGES:
Upgrade to plotlyjs v1.10.0 –https://github.com/plotly/plotly.js/releases/tag/v1.10.0
Distinguish between “built” (plotly_built) and “non-built”(plotly_hash) plotly objects. See #562
3.5.0 – 19 Apr 2016
NEW FEATURES:
The toRGB() function will now respect alpha channels in hex colorcodes and can recursively apply alpha.
CHANGES:
The toRGB() function will always output color codes with an alphachannel (e.g. toRGB(‘black’) is now ‘rgba(0,0,0,1)’ instead of‘rgb(0,0,0)’)
3.4.15 – 18 Apr 2016
BUGFIX:
The alpha in geom_smooth was incorrectly inheriting from otherlayers. See #551.
3.4.14 – 15 Apr 2016
CHANGES:
Upgrade to plotlyjs v1.9.0 –https://github.com/plotly/plotly.js/releases/tag/v1.9.0
3.4.13 – 6 Apr 2016
BUGFIX:
In some cases, marker color was inheriting from the marker line colorwhen it shouldn’t have. See ##537.
3.4.12 – 5 Apr 2016
CHANGES:
Upgrade to plotlyjs v1.8.0 –https://github.com/plotly/plotly.js/releases/tag/v1.8.0
3.4.11 – 2 Apr 2016
BUGFIX:
Fix bug when altering modebar button defaults
3.4.10 – 1 Apr 2016
BUGFIX:
Fix a geom_errorbar bug introduced in 3.4.9. See #513.
3.4.9 – 25 Mar 2016
BUGFIX:
Upgrade to plotlyjs 1.7.0. Fixes #513
3.4.8 – 23 Mar 2016
BUGFIX:
3.4.7 – 19 Mar 2016
BUGFIX:
3.4.6 – 17 Mar 2016
NEW FEATURES:
The ‘plotly_relayout’ event is now accessible via the event_data()function.
Fixed #514.
3.4.5 – 17 Mar 2016
BUGFIX:
Fixed #514.
3.4.4 – 17 Mar 2016
BUGFIX:
Show discrete positional values in tooltip (see #515); betterGeomTile conversion; pass plot object into layers2traces.
3.4.3 – 14 Mar 2016
BUGFIX:
Custom facet labeller functions will now translate correctly. See#507.
3.4.2 – 14 Mar 2016
BUGFIX:
Automatic resizing will now occur only when layout.autosize is true(the default). See #403.
3.4.1 – 13 Mar 2016
BUGFIX:
Legend titles are now supported.
3.4.0 – 12 Mar 2016
NEW FEATURES:
CHANGES:
BUGFIX:
3.3.1 – 10 Mar 2016
CHANGES:
BUGFIX:
3.2.1 – 10 Mar 2016
BUGFIX:
3.2.0 – 10 Mar 2016
CHANGES:
NEW FEATURES:
3.1.0 – 8 Mar 2016
CHANGES:
3.0.0 – 8 Mar 2016
NEW FEATURES:
CHANGES:
BUG FIXES:
2.5.0 – 1 Mar 2016
NEW FEATURES
New event_data() function provides easy access to plotly eventsin shiny. For an example, seehttps://github.com/ropensci/plotly/tree/master/inst/examples/plotlyEvents
plot_ly() and ggplotly() gain a source argument to differentiatebetween plotly events in shiny apps with multiple plots. ggplotly() alsogains width and height arguments.
CHANGES
The arguments filename, fileopt, world_readable in ggplotly() wereremoved as they should be provided to plotly_POST() instead.
2.4.4 – 13 Feb 2016
as.widget() now returns htmlwidget objects untouched. See #449.
2.4.3 – 11 Feb 2016
Ensure that we always return HTTPS links. Fixes #455
2.4.2 – 9 Feb 2016
Fix for on-premise domain configuration.
2.4.1 – 2 Feb 2016
Attach base_url in as.widget() so it works in multiple contexts
2.4.0 – 1 Feb 2016
2.3.4 – 1 Feb 2016
Added a plotly_api_domain environment variable for configuring theAPI domain. Fixes #441
2.3.3 – 27 Jan 2016
Bump axis number for each trace matching a panel number. fixes#318
2.3.2 – 25 Jan 2016
More accurate list of data_array properties. Fixes #415
2.3.1 – 25 Jan 2016
More accurate conversion of path width. Fixes #373.
2.3.0 – 19 Jan 2016
Add sharing argument and deprecate world_readable. Fixes #332
2.2.4 – 18 Jan 2016
Fix for error in embed_notebook(). See #409.
2.2.3 – 18 Jan 2016
Fix for geom_vline(). See #402.
2.2.2 – 18 Jan 2016
Fix bar orientation when we detect geom_bar() + coord_flip() inggplotly(). Fixes #390.
2.2.1 – 18 Jan 2016
Search for axis title in scene object. fixes #393.
2.2.0 – 13 Jan 2016
The default for layout.hovermode is now ‘closest’ for non-linescatter traces
2.1.3 – 12 Jan 2016
Fix size and alpha translation for geom_point. Fixes #386
2.1.2 – 11 Jan 2016
Upgraded to plotlyjs 1.4.1. For a list of changes, seehttps://github.com/plotly/plotly.js/releases/tag/v1.4.1
2.1.1 – 11 Jan 2016
Upgraded to plotlyjs 1.4. For a list of changes, seehttps://github.com/plotly/plotly.js/releases/tag/v1.4.0
2.1.0 – 29 Dec 2015
plot_ly() now defaults to inherit=FALSE and plotly_build() is nowidempotent. Fixes #280 and #277. See #368 for details.
2.0.19 – 23 Dec 2015
Added as.widget() function for conveniency in converting plotlyobject to htmlwidget objects. See #294.
2.0.18 – 22 Dec 2015
Fix #365
2.0.17 – 22 Dec 2015
Fix #358
2.0.16 – 18 Dec 2015
Require ggplot2 2.0.0 or higher. For details, see #269.
2.0.15 – 13 Dec 2015
Fix #346
2.0.14 – 13 Dec 2015
Fix #212
2.0.13 – 12 Dec 2015
Fix #286
2.0.12 – 11 Dec 2015
Fix #221
2.0.11 – 11 Dec 2015
Fix #250
2.0.10 – 10 Dec 2015
Fix #225
2.0.9 – 10 Dec 2015
Fix #333
2.0.8 – 10 Dec 2015
Fix a bug with geom_segment (see #321 & #228)
2.0.7 – 10 Dec 2015
Fix #233
2.0.6 – 2 Dec 2015
Upgrade to plotlyjs 1.1.1. Fixes #319.
2.0.5 – 1 Dec 2015
Fix for legend names. See #236.
2.0.4 – 28 Nov 2015
Fix #313.
2.0.3 – 18 Nov 2015
Fixed bug causing knitr options to be ignored. Also addedVignetteBuilder to DESCRIPTION to vignette is available.
2.0.2 – 17 Nov 2015
Using plotly_build() on a ggplot object should always return a plotlyobject
2.0.1 – 17 Nov 2015
Better printing of server figures. Documentation and other fixes forinitial CRAN release!
2.0.0 – 2 Nov 2015
Added a dependency on htmlwidgets and ‘offline’ plots are now thedefault. If you want to create a figure on a plotly server, you need touseplotly_POST(). Also added aconfig()function to control the default appearance of the interactive plot
1.0.10 – 3 Nov 2015
Fixed #292.
1.0.9 – 28 Sep 2015
Fixed filename, fileopt arguments in plot_ly. Specifying the samefilename will now overwrite the plot if it exists.
1.0.8 – 14 Sep 2015
Added the plotly_IMAGES() function which interfaces to the imagesendpoint https://api.plot.ly/v2/#images
Details -> https://github.com/ropensci/plotly/pull/279
1.0.7 – 26 Aug 2015
See https://github.com/ropensci/plotly/pull/275
1.0.6 – 25 Aug 2015
Fix a bug with subplot domain calculations (seehttps://github.com/ropensci/plotly/pull/274)
1.0.5 – 20 Aug 2015
Fix issue converting plotly offline markdown documents to HTML whenusingmarkdown::markdownToHTML
1.0.4 – 14 Aug 2015
Bug fix for subplot. See #265
1.0.3 – 7 Aug 2015
Improved legend positioning. See #241
1.0.2 – 2 Aug 2015
1.0.1 – 2 Aug 2015
Removed the stream() function as it wasn’t ready to be included.
1.0.0 – 31 July 2015
A major reworking of package internals which includes a few backwardsincompatible changes.
Major changes include:
plot_ly(),add_trace(),layout(),andstyle() functions).subplot() function for putting several graphson a single page.renderPlotly() andplotlyOutput() functions for embedding plotly graphs inshiny applications.offline() function for creating standalone HTMLpages via Plotly Offline (see http://purchasing.plot.ly/)For more details, see the new vignettes withbrowseVignettes(package = "plotly") and/or the pull request-> https://github.com/ropensci/plotly/pull/226
0.6.3 – 2 June 2015
Add new tests inspired by the R Cookbook distributions #214
0.6.2 – 19 May 2015
In geom_bar(stat = “identity”), sum y values if multiple for a givenx.
0.6.1 – 5 May 2015
Add test-cookbook-lines.R and fix bugs that showed up in thosetests.
0.6 – 4 May 2015
Let gg2list() return a figure object (backwards incompatiblechange).
0.5.29 – 16 April 2015
geom_density() as filled area chart #202
0.5.28 – 15 April 2015
Let ggplot handle histogram binning. Fix #198
0.5.27 – 19 Mar 2015
Reimplement geom_ribbon as a basic polygon. Fix #191. Fix #192.
0.5.26 – 18 Mar 2015
Implemented geom_rect #178
0.5.25 – 10 March 2015
Implemented geom_smooth() #183
0.5.24 – 10 March 2015
Implemented facet_wrap(scales=“free”) #167
0.5.23 – 10 March 2015.
geom_ribbon() now respects alpha transparency
0.5.22 – 2 March 2015.
Fixes for ylim() #171.
0.5.21 – 23 February 2015.
Fixes for error bars and tick marks.
0.5.20 – 9 February 2015.
Add alpha transparency to fill conversion. Let geom_area supportcolour and fill aesthetics.
0.5.19 – 23 January 2015.
Support class conversion such as as.Date() within ggplot code.
0.5.18 – 22 January 2015.
Return proper filepath when filename contains directories.
0.5.17 – 30 December 2014.
Support date-time binning in histograms.
0.5.16 – 29 December 2014.
Support colour aesthetic in geom_text().
0.5.15 – 19 December 2014.
Use proper RCurlOptions in get_figure() method.
0.5.14 – 1 December 2014.
Make layers geom_line + geom_point only one trace in Plotly.
0.5.13 – 27 November 2014.
Rename translation file and server endpoint parameter to be hip.
0.5.12 – 12 November 2014.
Improve legend title position.
0.5.11 – 11 November 2014.
Show legend title.
0.5.10 – 7 November 2014.
Improve showlegend and fix legend’sx position.
0.5.9 – 3 November 2014.
Default colours for geom_polygon().
0.5.8 – 30 October 2014.
Support hline over a factor x range. Default colours forgeom_boxplot().
0.5.7 – 29 October 2014.
Default colours for geom_area() and geom_ribbon().
0.5.6 – 28 October 2014.
Convert line size faithfully.
0.5.5 – 24 October 2014.
Support category histograms (with factors).
0.5.4 – 22 October 2014.
Support conversion of geom_vline().
0.5.3 – 21 October 2014.
Support conversion of geom_bar() with position_dodge().
0.5.2 – 18 October 2014.
Support aesthetic shape in geom_path() and, hence, geom_line()(conversion).
0.5.1 – 15 October 2014.
Do not show zero lines by default (as in ggplot2 plots).
0.5.0 – 15 October 2014.
From now on, version numbers are meaningful again… Many changesmeanwhile, especially support for more geoms.
0.4 – 7 April 2014.
Re-write geom to trace conversion code.
0.3.8 – 21 March 2014.
ggplotly takes the last_plot() by default.
Support for ggplotly layout elements title, tickcolor, gridcolor,showlegend, plot_bgcolor, paper_bgcolor, tickangle, axis titles, plotborder colors.
0.3.7 – 14 March 2014.
For ggplotly:
if on the command line, open a web browser (as before).
if in knitr/Rmd in a chunk with plotly=TRUE, embed theplot.
0.3.6 – 10 March 2014.
Merge ggplotly code.
0.3.5