All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
- Updated Plotly.js from version 2.35.0 to version 2.35.2. See the plotly.js CHANGELOG for more information.
- New
px
functions for maps:scatter_map
,line_map
,choropleth_map
, anddensity_map
.
-
Updated Plotly.js from version 2.34.0 to version 2.35.0. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. Notable changes include: -
Fixed a bug in integer validation of arrays that threw an error when an array contained a mix of strings and integers.
- Updated Plotly.js from version 2.32.0 to version 2.34.0. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. Notable changes include:- Add
subtitle
attribute tolayout.title
to enable adding subtitles to plots [#7012] - Introduce "u" and "s" pseudo html tags to add partial underline and strike-through styles to SVG text elements [#7043]
- Add geometric mean functionality and 'geometric mean ascending' + 'geometric mean descending' to
category_order
on cartesian axes [#6223], with thanks to @acxz and @prabhathc for the contribution! - Add axis property
ticklabelindex
for drawing the label for each minor tick n positions away from a major tick, with thanks to @my-tien for the contribution! [#7036] - Add property
ticklabelstandoff
andticklabelshift
to cartesian axes to adjust positioning of tick labels, with thanks to @my-tien for the contribution! [#7006] - Add
x0shift
,x1shift
,y0shift
,y1shift
to shapes to add control over positioning of shape vertices on (multi-)category axes, with thanks to @my-tien for the contribution! [#7005]
- Add
- Specify Python version 3.8-3.11 for development virtual environments and pin
pytest
at version 8.1.1 to match. - Update
IntegerValidator
to handleextras
option to allow supporting additional keyword values. For example, 'bold' and 'normal' as well as integers as used in font weights [#4612].
- Updated Plotly.js from version 2.31.1 to version 2.32.0. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. Notable changes include:- Add "bold" weight, "italic" style and "small-caps" variant options to fonts [#6956]
- Fix applying autotickangles on axes with showdividers as well as cases where tickson is set to "boundaries" [#6967], with thanks to @my-tien for the contribution!
- Fix positioning of multi-line axis titles with standoff [#6970], with thanks to @my-tien for the contribution!
- Updated Plotly.js from version 2.30.0 to version 2.31.1. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. Notable changes include:- Add
zorder
attribute to various cartesian traces for controlling stacking order of SVG traces drawn into a subplot [#6918, #6953], This feature was anonymously sponsored: thank you to our sponsor! - Add "between" option to shape layer for placing them above grid lines and below traces [#6927], with thanks to @my-tien for the contribution!
- Add "raw"
sizemode
to cone trace [#6938] - Add
layout.hoversubplots
to enable hover effects across multiple cartesian suplots sharing one axis [#6947, #6950]
- Add
- Fixed
orjson
loading issue [#4562]
- Updated Plotly.js from version 2.29.1 to version 2.30.0. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. Notable changes include:
- Updated Plotly.js from version 2.27.0 to version 2.29.1. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. Notable changes include:- Add
layout.barcornerradius
andtrace.marker.cornerradius
properties to support rounding the corners of bar traces [#6761], with thanks to Displayr for sponsoring development! - Add
autotickangles
to cartesian and radial axes [#6790], with thanks to @my-tien for the contribution! - Add
align
option to sankey nodes to control horizontal alignment [#6800], with thanks to @adamreeve for the contribution! - Add the possibility of loading "virtual-webgl" script for WebGL 1 to help display several WebGL contexts on a page [#6784], with thanks to @greggman for the contribution!
- Add options to use base64 encoding (
bdata
) andshape
(for 2 dimensional arrays) to declare various typed arrays i.e.dtype=(float64|float32|int32|int16|int8|uint32|uint16|uint8)
[#5230] - Adjust stamen styles to point to
stadiamaps.com
, the users may also need to provide their own API_KEY viaconfig.mapboxAccessToken
[#6776, #6778]
- Add
- Removed Python 3.6 and Python 3.7 support [#4492]
- Ensure scatter
mode
is deterministic frompx
[#4429] - Fix issue with creating dendrogram in subplots [#4411],
- Fix issue with px.line not accepting "spline" line shape [#2812]
- Fix KeyError when using column of
pd.Categorical
dtype with unobserved categories [#4437] - Fix dataframe interchange in case
column_names
returns an unmaterialized object: generator, iterator, etc. [#4442] - Fix issue with
FutureWarning
being displayed when setting thecolor
argument inplotly.express
[#4519]
- Updated Plotly.js from version 2.26.0 to version 2.27.0. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. Notable changes include:- Add
insiderange
to cartesian axes to help avoid overlap between visible grid lines and tick labels of the counter axis when they are positioned inside [#6735], this feature was anonymously sponsored: thank you to our sponsor! - Fix column order changes on hover [#6718], with thanks to @bhavinpatel1109 for the contribution!
- Fix hover at timestamp '1970-01-01 00:00:00' [#6752], with thanks to @adamjhawley for the contribution!
- Fix clearing empty
candlestick
using react [#6757]
- Add
- Repair crash on Matplotlib 3.8 related to get_offset_position [#4372],
- Handle deprecation of
pandas.Series.dt.to_pydatetime()
calls and suppress theFutureWarning
they currently emit. [#4379]
- Improved json docstrings, added
BasePlotlyType.to_json()
method [#4301] - Updated Plotly.js from version 2.25.2 to version 2.26.0. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. Notable changes include:- Add "min", "max", "min reversed" and "max reversed" autorange options and handle partial ranges (i.e. one end being null), add
autorangeoptions
(clipmin
,clipmax
,minallowed
,maxallowed
,include
) as well asminallowed
andmaxallowed
to cartesian, gl3d and radial axes [#6547] - Add [n]-sigma (std deviations) box plots as an alternative to quartiles [#6697], with thanks to @28raining for the contribution!
- Add "top left" & "top center" side options to legend title [#6711], with thanks to @28raining for the contribution!
- Add "false" option to
scaleanchor
to allow removing a constraint that is set by default [#6712], with thanks to @lvlte for the contribution!
- Add "min", "max", "min reversed" and "max reversed" autorange options and handle partial ranges (i.e. one end being null), add
- Fixed two issues with px.imshow: [#4330] when facet_col is an earlier dimension than animation_frame for xarrays and [#4329] when facet_col has string coordinates in xarrays [#4331]
- Fixed issue with necessary columns from complex arguments dropped when interchanging dataframes [#4324]
- Updated Plotly.js from version 2.24.1 to version 2.25.2. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. Notable changes include: px
methods now accept data-frame-like objects that support a dataframe interchange protocol, such as polars, vaex, modin etc. This protocol has priority onto_pandas
call, but will only be used if pandas>=2.0.2 is installed in the environment.px
methods now accept data-frame-like objects that support atoPandas()
method, such as Spark DataFrames, or ato_pandas_df()
method, such as Vaex DataFrames.
- Fixed Pandas performance warning issue caused by multiple
frame.insert
[#4246]
- Updated Plotly.js from version 2.20.0 to version 2.24.1. See the plotly.js CHANGELOG for more information. Notable changes include:
- Add pattern to pie, funnelarea, sunburst, icicle and treemap traces [#6601, #6619, #6622, #6626, #6627, #6628, #6629], with thanks to @thierryVergult for the contribution!
- Add
texttemplate
to shape.label for parametric shapes i.e. line, rect and circle [#6527], with thanks to the Volkswagen Center of Excellence for Battery Systems for sponsoring development! - Add strict option to custom bundle command [#6557], with thanks to @CallumNZ for the contribution!
- Add
legend
references to traces andlegend2
,legend3
, etc. to layout, also addvisible
to legend i.e. to allow positioning multiple legends on a graph [#6535], this feature was anonymously sponsored: thank you to our sponsor! - Add
legend.xref
andlegend.yref
to enable container-referenced positioning of legends [#6589], with thanks to Gamma Technologies for sponsoring the related development. - Add
colorbar.xref
andcolorbar.yref
to enable container-referenced positioning of colorbars [#6593], with thanks to Gamma Technologies for sponsoring the related development.
px
methods now accept data-frame-like objects that support ato_pandas()
method, such as polars, cudf, vaex etc [#4244], [#4286]
- Fixed another compatibility issue with Pandas 2.0, just affecting
px.*(line_close=True)
[#4190] - Empty pandas dataframe with facet row/column set no longer fails [#4038]
- Added some rounding to the
make_subplots
function to handle situations where the user-input specs cause the domain to exceed 1 by small amounts [#4153] - Sanitize JSON output to prevent an XSS vector when graphs are inserted directly into HTML [#4196]
- Fixed issue with shapes and annotations plotting on the wrong y axis when supplied with a specific axis in the
yref
parameter [#4177] - Remove
use_2to3
setuptools arg, which is invalid in the latest Python and setuptools versions [#4206] - Fix #4066 JupyterLab v4 giving tiny default graph height [#4227]
- Fixed issue with
colors.n_colors
where generated RGB color values were not being constrained to stay between 0 and 255 [#4110] - Fix streamline figure factory with recent versions of Numpy
- Fix issue with shapes and annotations not drawing on correct axis [#4177]
- Fixed compatibility issue with Pandas 2.0 [#4103]
- Updated Plotly.js from version 2.18.2 to version 2.20.0. See the plotly.js CHANGELOG for more information. Notable changes include:
- Add
title.automargin
to enable automatic top and bottom margining for both container and paper referenced titles [#6428], with thanks to Gamma Technologies for sponsoring the related development. - Add
label
attribute to shapes [#6454], with thanks to the Volkswagen Center of Excellence for Battery Systems for sponsoring development! - Add
labelalias
to various axes namely cartesian, gl3d, polar, smith, ternary, carpet, indicator and colorbar [#6481], this feature was anonymously sponsored: thank you to our sponsor!
- Add
- Key errors no longer precalculated when performing updates on plots [#4101]
- Fixed an issue with characters displaying incorrectly, by adding
charset="utf-8"
to scripts into_html
[#4114] - Added
packaging
to install requirements, fixing aNo module named 'packaging
error on Python 3.6 [#4113]
- Added option to allow passing a column name as a
str
inhover_data
andcustom_data
inplotly.express
[4083]
- Updated Plotly.js to from version 2.18.0 to version 2.18.2. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. - Updated distutils.Version to packaging.Version #3897] and #4055]
- Updated Plotly.js to from version 2.17.1 to version 2.18.0. See the plotly.js CHANGELOG for more information. Notable changes include:
- Build process now uses Node 18.x and version 2 lockfile (should be an invisible change for users) [#4034]
write_html()
now explicitly encodes output as UTF-8 because Plotly.js' bundle contains such characters [#4021] and [#4022]- fixed
iframe
renderer regression from 5.12 and also fixed error when this renderer was used in the very first cell in a notebook [#4036]
- Support for ipywidgets 8 [#3930]
- Updated Plotly.js to from version 2.16.1 to version 2.17.1. See the plotly.js CHANGELOG for more information. Notable changes include:
- Add
shift
andautoshift
to cartesian y axes to help avoid overlapping of multiple axes [#6334], with thanks to Gamma Technologies for sponsoring the related development! - Introduce group attributes for
scatter
trace i.e.alignmentgroup
,offsetgroup
,scattermode
andscattergap
[#6381], this feature was anonymously sponsored: thank you to our sponsor! - Add
marker.cornerradius
attribute totreemap
trace [#6351]
- Add
- Fixed the usage of some deprecated NumPy types which were removed in NumPy 1.24 [#3997]
- Fixed bug for trendlines with datetime axes [#3683]
marker.angle
attribute now accepts iterables where appropriate [#4013]selector=0
now correctly returns the first trace in.select_traces()
and related methods [#3817]
- Updated Plotly.js to from version 2.14.0 to version 2.16.1. See the plotly.js CHANGELOG for more information. Notable changes include:
- Add clustering options to
scattermapbox
[#5827], with thanks to @elben10 for the contribution! - Add bounds to mapbox suplots [6339]
- Add
angle
,angleref
andstandoff
tomarker
and addbackoff
toline
; also introduce new arrow symbols to facilitate drawing networks [#6297] - Add
minreducedwidth
andminreducedheight
to layout for increasing control over automargin [#6307] - Add
entrywidth
andentrywidthmode
to legend [#6202, #6324]
- Add clustering options to
- Updated Plotly.js to from version 2.12.1 to version 2.14.0. See the plotly.js CHANGELOG for more information. Notable changes include:
- Add support for
sankey
links with arrows - Add
selections
,newselection
andactiveselection
layout attributes to have persistent and editable selections over cartesian subplots - Add
unselected.line.color
andunselected.line.opacity
options toparcoords
trace - Display Plotly's new logo in the modebar
- Add support for
pattern_shape
options now available inpx.timeline()
#3774facet_*
andcategory_orders
now available inpx.pie()
#3775
px
methods no longer callgroupby
on the input dataframe when the result would be a single group, and no longer groups by a lambda, for significant speedups #3765 with thanks to @jvdd
- Allow non-string extras in
flaglist
attributes, to support upcoming changes toax.automargin
in plotly.js plotly.js#6193, #3749
- Fixed a syntax error that caused rendering issues in Databricks notebooks and likely elsewhere. #3763 with thanks to @fwetdb
(no changes, due to a mixup with the build process!)
- Improve support for type checking and IDE auto-completion by bypassing lazy-loading when type checking. #3425 with thanks to @JP-Ellis
- line dash-style validators are now correctly used everywhere so that values like
10px 2px
are accepted #3722 - Resolved various deprecation warning messages and compatibility issues with upstream dependencies and Python 3.11, plus removed dependency on
six
, with thanks to @maresb, @hugovk, @tirkarthi, @martinRenou, and @BjoernLudwigPTB - Better support for MathJax 3 #3706
- Type annotations for Plotly Express functions and chainable
go.Figure
methods, for better IDE auto-completion #3708
- Updated Plotly.js to from version 2.11.1 to version 2.12.1. See the plotly.js CHANGELOG for more information. Notable changes include:
- Add
minor
ticks to cartesian axes - Add
griddash
option to most axes
- Add
- added
pattern_shape
options topx.area()
#3668
- Updated Plotly.js to from version 2.9.0 to version 2.11.1. See the plotly.js CHANGELOG for more information. Notable changes include:
- Add
fillpattern
options toscatter
trace - Various JS-specific improvements such as MathJax 3.0 support
- Add
- Updated Plotly.js to from version 2.8.3 to version 2.9.0. See the plotly.js CHANGELOG for more information. Notable changes include:
- Implement
ticklabelstep
to reduce labels on cartesian axes and colorbars - Display the version of plotly.js when hovering over the modebar
- Implement
text_auto
argument topx.bar
,px.histogram
,px.density_heatmap
,px.imshow
#3518- Deprecated
ff.create_annotated_heatmap
,ff.create_county_choropleth
,ff.create_gantt
#3518 div_id
argument topio.to_html
,pio.write_html
,fig.to_html
andfig.write_html
to optionally make its IDs deterministic #3487 with thanks to @Skn0tt
- Fixed ValueError when
ff.create_annotated_heatmap
passesrgba()
colors intoto_rgb_color_list
#3478 with thanks to @janosh
- Updated Plotly.js to from version 2.6.3 to version 2.8.3. See the plotly.js CHANGELOG for more information. Notable changes include:
- Horizontal color bars
texttemplate
for histogram-like and heatmap-like traces
- Fixed error when serializing dict with mix of string and non-string keys #3380
- The JSON serialization engines no longer sort their keys #3380
- Updated Plotly.js to from version 2.4.2 to version 2.6.3. See the plotly.js CHANGELOG for more information. Notable changes include:
- New subplot type
smith
that supportsscattersmith
trace types for visualizing data in the complex domain - Changes to Plotly.js packaging
- New subplot type
- Updated Plotly.js to from version 2.4.1 to version 2.4.2. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. Notable changes include:- Bug fix for rendering unified hover labels in classic Jupyter Notebooks
- Updated Plotly.js to from version 2.3.1 to version 2.4.1. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. Notable changes include:- Added
legend.groupclick
options - Provide bbox of hover items in event data
- Added
- Fixed error when using the orjson engine with non-string keys #3351
- Updated Plotly.js to from version 2.2.0 to version 2.3.1. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. Notable changes include:- new projections in
geo
subplots from a more recent version ofd3-geo
- new number-formatting directives from a more recent version of
d3-format
- Improve rendering of
scattergl
,splom
andparcoords
by implementingplotGlPixelRatio
for those traces - performance improvements and bug fixes
- new projections in
- Extra flags were added to the
gapminder
andstocks
dataset to facilitate testing, documentation and demos #3305 - All line-like Plotly Express functions now accept
markers
argument to display markers, and all butline_mapbox
acceptsymbol
to map a field to the symbol attribute, similar to scatter-like functions #3326 px.scatter
andpx.density_contours
now support newtrendline
types'rolling'
,'expanding'
and'ewm'
#2997px.scatter
andpx.density_contours
now support newtrendline_options
argument to parameterize trendlines, with support for constant control and log-scaling in'ols'
and specification of the fraction used for'lowess'
, as well as pass-through to Pandas for'rolling'
,'expanding'
and'ewm'
#2997px.scatter
andpx.density_contours
now support newtrendline_scope
argument that accepts the value'overall'
to request a single trendline for all traces, including across facets and animation frames #2997- A new
px.ecdf()
function for Empirical Cumulative Distribution Functions #3330
- Fixed regression introduced in version 5.0.0 where pandas/numpy arrays with
dtype
of Object were being converted tolist
values when added to a Figure (#3292, #3293) - Better detection of Chrome and Chromium browsers in the Renderers framework, especially on Linux (#3278) with thanks to @c-chaitanya for the contribution
- Updated Plotly.js to from version 2.1.0 to version 2.2.0. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. Notable changes include:- new
<trace>.legendgrouptitle
attribute for legend group titles - new
%h
text formatting directive for half-years - performance improvements and bug fixes
- new
Items in this section may be considered backwards-incompatible changes for the purposes of Semantic Versioning but we expect the vast majority of users to be able to upgrade to version 5.0 without encountering any issues.
- Dropped support for Python older than 3.6 #3160
- Updated Plotly.js to from version 1.58.4 to version 2.1.0. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. Notable changes include:- dropped support for IE9 and IE10
- dropped support for long-deprecated
graph_objects
likearea
traces andscatter.(t|r)
andlayout.(radial|angular)axis
attributes - modebar no longer has hovermode or spikeline buttons by default (can be added back with
fig.update_layout(modebar_add=["v1hovermode", "toggleSpikeLines"])
) - "Aa" text no longer appears on legend items unless
mode="text"
- In
bar
traces,textposition
now defaults to"auto"
- Font size for legend and colorbar titles now matches axis title font size (slightly bigger)
- deprecated
heatmapgl
,pointcloud
traces as well as alltransform
attributes
- Combined
plotlywidget
intojupyterlab-plotly
and packaged them as a federated extension #3142 with massive thanks to @fcollonval for the contribution- In addition to this change, large Plotly.js bundles are now lazily loaded on-demand by JupyterLab
- Plotly.js CDN url will now be versioned by default for HTML exports using
include_plotlyjs='cdn'
and for "connected" renderers. #2961 with thanks to @adehad for the contribution - Recommending Kaleido by default over Orca #3094
- Replaced
retrying
dependency withtenacity
#2911 with thanks to @jmsmdy for the contribution - Plotly Express now always takes into account every value in
category_orders
when computing discrete mappings (color, symbol, line-dash, pattern-shapes) as well as facets, even those values which are absent in the data #3247
- Additions due to bumping Plotly.js from 1.58.4 to 2.1.0 (see changelog):
- New
icicle
trace type, with thanks to @Kully and @mtwichan of Zyphr for their contribution! - New
marker.pattern
options forbar
-like trace types with thanks to @s417-lama for the contribution! - New
legendrank
attribute to control rank of traces within legends
- New
- Plotly Express'
px.bar()
,px.histogram()
andpx.bar_polar()
now support thepattern_shape
argument #3252 - New Plotly Express
px.icicle()
function, with thanks to @Kully and @mtwichan of Zyphr for their contribution! #3256 - New functions in
plotly.colors
:get_colorscale()
andsample_colorscale()
#3136 and #3186 with thanks to @CarlAndersson for the contributions - Faster JSON encoding when
orjson
is present #2955
- Pandas and Numpy datetime serialization fixes #3022
- Fixed selected points of histograms in FigureWidget #2771 with thanks to @meffmadd for the contribution
- Static image export now honors
layout.(width|height)
#3240 - Improvements to "matplotlylib" conversion utility in
plotly.tools.mpl_to_plotly()
with thanks to @fdion #3143
px.timeline()
now allowshover_data
formatting of start and end times 3018- Small change to packaging of
plotlywidget
extension for JupyterLab 3 3021
- JupyterLab extensions now compatible with JupyterLab 3.x 3016
- Updated Plotly.js to version 1.58.4. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. Notable changes include:- fixes for rendering 3d plots on recent Safari versions
- fixes to inside ticklabels
- regression fixes
px.histogram()
Y-axis labels now take into accounthistnorm
andbarnorm
2989px.histogram()
marginal
andfacet_*
now work correctly together 3014
- Updated Plotly.js to version 1.58.2. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. Notable changes include:- fixes for new
ticklabelposition
attribute - fixes for a regression related to treemaps in the previous version
- fixes for new
px.imshow
now supportsfacet_col
andanimation_frame
arguments for visualizing 3-d and 4-d images 2746px.defaults
now supportscolor_discrete_map
,symbol_map
,line_dash_map
,labels
andcategory_orders
as well as a.reset()
method 2957
- axes will now auto-type numeric strings as categorical data rather than linear in the default templates 2951
- Updated Plotly.js to version 1.58.1. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. Notable changes include:- a new
ticklabelposition
attribute to enable positioning tick labels inside the plotting area - better support for
scaleanchor
andmatches
on cartesian axes for matched square subplots - a new
autotypenumbers
attribute which is now set tostrict
in the default templates - various fixes relating to
automargins
for small figures
- a new
px.choropleth
,px.scatter_geo
andpx.line_geo
now support faceting as well asfitbounds
andbasemap_visible
2923px.scatter_geo
andpx.line_geo
now supportgeojson
/featureidkey
input 2923px.scatter_geo
now supportssymbol
2923go.Figure
now has aset_subplots
method to set subplots on an already existing figure. 2866- Added
Turbo
colorscale and fancier swatch display functions 2882 - A utility function
image_array_to_data_uri
has been added inplotly.utils
, in order to transform NumPy arrays to data b64 URIs (which can be passed to the source parameter ofgo.Image
, or to layout images). 2879 - the
selector
argument to updater/selector functions now acceptsint
s andstr
s 2894
- the JSON serialization of plotly figures has been accelerated thanks to a different handling of Infinity and NaN values. For example, a figure with a 1000x1000 Heatmap should now serialize 2x faster. 2880
- Coding mistakes with "magic underscores" now return significantly more ergonomic error messages 2843
- Error messages related to impossible subplot geometries are now much more helpful 2897
px.scatter_geo
support fortext
is fixed 2923- the
x
andy
parameters ofpx.imshow
are now used also in the case where an Image trace is used (for RGB data or withbinary_string=True
). However, only numerical values are accepted (while the Heatmap trace allows date or string values forx
andy
). 2761
- For
add_trace
,add_shape
,add_annotation
andadd_layout_image
, therow
and/orcol
argument now also accept the string"all"
.row="all"
adds the object to all the subplot rows andcol="all"
adds the object to all the subplot columns. (#2840) - Shapes that reference the plot axes in one dimension and the data in another dimension can be added with the new
add_hline
,add_vline
,add_hrect
,add_vrect
functions, which also support therow="all"
andcol="all"
arguments. (#2840) - The
add_trace
,add_shape
,add_annotation
,add_layout_image
,add_hline
,add_vline
,add_hrect
,add_vrect
functions accept an argumentexclude_empty_subplots
which ifTrue
, only adds the object to subplots already containing traces or layout objects. This is useful in conjunction with therow="all"
andcol="all"
arguments. (#2840) - For all
go.Figure
functions accepting a selector argument (e.g.,select_traces
), this argument can now also be a function which is passed each relevant graph object (in the case ofselect_traces
, it is passed every trace in the figure). For graph objects where this function returns true, the graph object is included in the selection. (#2844)
- Better magic underscore error messages. For example,
some_fig.update_layout(geo_ltaxis_showgrid=True)
showsBad property path:\ngeo_ltaxis_showgrid\n ^
and lists the valid properties forgeo
.
- Updated Plotly.js to version 1.57.1. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module.
- Updated Plotly.js to version 1.56.0. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module.
- Added
plotly.io.full_figure_for_development()
andplotly.graph_objects.Figure.full_figure_for_development()
(#2737)
- The JSON serialization of plotly figures had been accelerated by handling differently figures with and without NaN and Inf values (#2880).
- Updated Plotly.js to version 1.55.2. See the plotly.js CHANGELOG for more information. These changes are reflected in the auto-generated
plotly.graph_objects
module. px.imshow
has a newbinary_string
boolean argument, which passes the image data as a b64 binary string when True. Using binary strings allow for faster image rendering and smaller figure size. Additional optional argumentsbinary_backend
,binary_format
andbinary_compression_level
control how to generate the b64 string (#2691px.imshow
has a newcontrast_rescaling
argument in order to choose how to set data values corresponding to the bounds of the color range (#2691
- Plotly Express no longer converts datetime columns of input dataframes to UTC (#2749)
- Plotly Express has more complete support for datetimes as additional
hover_data
(#2749) - Histogram selection behaviour with
FigureWidget
(#2711) with thanks to @meffmadd - Behaviour of
full_html()
withhtml=False
(#2469) with thanks to @tallamjr ff.distplot()
now only computes traces that will be shown (#2730) with thanks to @akbo- Pandas backend
.hist()
works with latest version of Pandas (#2713) with thanks to @Kerybas
- Added image export support using Kaleido. The image export backend can be configured using the new
engine
argument toplotly.io.to_image
andplotly.io.write_image
. Theengine
argument may be set to"kaleido"
,"orca"
, or"auto"
. The default isengine="auto"
, in which case the Kaleido backend is enabled if thekaleido
package from PyPI is installed, otherwise Orca is used. (#2613). plotly.express.timeline()
added as an official alternative toplotly.figure_factories.create_gantt()
(#2626)create_hexbin_mapbox()
added to Figure Factories, with thanks to @RenaudLN for the impressive contribution!facet_row_spacing
andfacet_col_spacing
added to Plotly Express cartesian 2d functions (#2614)base
added to Plotly Expressbar
andbar_polar
functions (#2626)px.NO_COLOR
constant to override wide-form color assignment in Plotly Express (#2614)
- trendline traces are now of type
scattergl
whenrender_mode="webgl"
in Plotly Express (#2614) - regression from 4.8.1 whereby
"parent"
was not accepted as part ofpath
forpx.sunburst()
andpx.treemap()
(#2640) create_dendrogram()
figure factory now works correctly withscipy
1.5.1 (#2627)
- Updated Plotly.js to version 1.54.6. See the plotly.js CHANGELOG for more information.
- Added all cartesian-2d Plotly Express functions, plus
imshow
, to Pandas backend withkind
option (#2541) plotly.express.imshow
now uses data frame index and columns names and values to populate axis parameters by default (#2539)- Javascript extensions are now build using Node 12, and have an updated
package-lock.json
with many fewer security warnings (#2636)
- Updated Plotly.js to version 1.54.5. See the plotly.js CHANGELOG for more information.
add_traces()
now accepts bareint
-like values forrows
/cols
as well as lists thereof (#2546), with thanks to @MCBoarder289 for the contribution!
row
/col
now acceptint
-like values, not strictlyint
values (#2451), with thanks to @MCBoarder289 for the contribution!- Fixed special cases with
px.sunburst
andpx.treemap
withpath
input (#2524) - Fixed bug in
hover_data
argument ofpx
functions, when the column name is changed with labels andhover_data
is a dictionary setting up a specific format for the hover data (#2544). - Made the Plotly Express
trendline
argument more robust and made it work with datetimex
values (#2554) - Fixed bug in
px.sunburst
andpx.treemap
: when thecolor
andvalues
arguments correspond to the same column, a different aggregation function has to be used for the two arguments (#2591) - Plotly Express wide mode now accepts mixed integer and float columns (#2598)
- Plotly Express
range_(x|y)
should not impact the unlinked range of marginal subplots (#2600) px.line
now setsline_group=<variable>
in wide mode by default (#2599)- Corrected some regex warnings (#2577), with thanks to @georgevdd for the contribution!
- Fixed the accidental removal of some functions and submodules from
plotly.colors
andplotly.express.colors
plotly
now provides a Plotly Express-backed Pandas-compatible plotting backend, which can be activated viapandas.options.plotting.backend = "plotly"
. Note that it is not intended to implement every Pandas plotting function, nor is it intended to replicate the behaviour of every argument, although per the changes below,x
andy
should behave similarly. (#2336)- New datasets have been added to
plotly.express.data
:stocks
,experiment
,medals_wide
andmedals_long
. (#2336) - plotly
go.Figure
andgo.FigureWidget
now have a_repr_html_
and a_repr_mimebundle_
method, which are standard hooks for integration in systems based on IPython. In particular, with_repr_html_
plotly figures can now be used within sphinx-gallery without any scraper. These additions should not change anything to the way plotly figures are displayed in notebook environments, since the_ipython_display_
method (already present in earlier versions) takes precedence over the new methods.
- The behaviour of the
x
,y
,orientation
,histfunc
,violinmode
,boxmode
andstripmode
arguments for 2d-cartesian functions in Plotly Express (i.e.scatter
,line
,area
,bar
,histogram
,violin
,box
,strip
,funnel
,density_heatmap
anddensity_contour
) has been refined (#2336):- if
x
ory
is missing, it is inferred to be the index ofdata_frame
ifdata_frame
provided, otherwise a stable index of integers starting at 0. In the case ofpx.bar
, if the provided value is not continuous, the missing value is treated as a column of 1s named "count", so as to behave more likepx.histogram
and to avoid sizing the resulting bars differently based on their position in the column. Previously, missing values defaulted to integers starting at 0 per trace which made it potentially inconsistent or misleading. - if
x
(y
) is missing,orientation
now defaults tov
(h
). Previously it always defaulted tov
but this is not considered a breaking change, as the cases in which it now defaults toh
caused unreadable output if set tov
. - if both
x
andy
are provided and one of them does not contain continuous values,orientation
defaults to the value perpendicular to that axis. Previously it always defaulted tov
but this is not considered a breaking change, as the cases in which it now defaults toh
caused unreadable output if set tov
. - if either
x
ory
(but not both) may now be provided as a list of column references intodata_frame
or columns of data, in which case the imputed data frame will be treated as "wide" data andmelt()
ed internally before applying the usual mapping rules, with function-specific defaults. - if neither
x
nory
is provided butdata_frame
is, the data frame will be treated as "wide" with defaults depending on the value oforientation
(andorientation
has accordingly been added toscatter
,line
,density_heatmap
, anddensity_contour
for this purpose). Previously this would have resulted in an empty figure. - if both
x
andy
are provided tohistogram
, and ifx
,y
andz
are provided todensity_heatmap
ordensity_contour
, thenhistfunc
now defaults tosum
so as to avoid ignoring the provided data, and to causehistogram
andbar
to behave more similarly. violinmode
,boxmode
andstripmode
now default tooverlay
ifx
(y
) in inv
(h
) orientation is also mapped tocolor
, to avoid strange spacing issues with the previous default ofgroup
in all cases.
- if
- The Plotly Express arguments
color_discrete_map
,symbol_map
andline_dash_map
now accept the string"identity"
which causes the corresponding input data to be used as-is rather than mapped intocolor_discrete_sequence
,symbol_sequence
orline_dash_sequence
, respectively. (#2336) - Plotly Express now accepts
px.Constant
orpx.Range
objects in the place of column references so as to express constant or increasing integer values. (#2336)
- Fix
AttributeError: module 'plotly.graph_objs' has no attribute 'FigureWidget'
exception onfrom plotly.graph_objs import *
whenipywidgets
is not installed. Error also occurred when importingplotly.figure_factor
. It is now possible to importplotly.graph_objs.FigureWidget
whenipywidgets
is not installed, and an informativeImportError
exception will be raised in theFigureWidget
constructor (#2443, #1111). - Fix
TypeError: unhashable type: 'Template'
duringFigure
construction whenplotly.io.templates.default
is set to aTemplate
object rather than a string.
- Updated Plotly.js to version 1.54.1. See the plotly.js CHANGELOG for more information. The main new feature of this version of Plotly.js is the possibility to draw layout shapes, using custom dragmodes and corresponding modebar buttons.
- The sphinx-gallery scraper has been updated to work with different structures of galleries #2149
- The
hover_data
parameter ofpx
functions can now be a dictionary. This makes it possible to skip hover information for some arguments or to change the formatting of hover information #2377. - It's now possible to build a development version of Plotly.py against the build artifacts from a non-
master
branch of Plotly.js, which makes for faster QA and development cycles #2349. Thanks @zouhairm for this Pull Request!
- Plotly Express trendlines now handle missing data correctly #2357
This version includes several performance improvements (#2368, #2403).
- Child graph objects (e.g.
figure.layout.xaxis
) are no longer created eagerly during graph object construction. Instead, they are created lazily the first time the property is accessed. - Property validation is now disabled for select internal operations.
- When used with Python 3.7 and above, plotly.py now takes advantage of PEP-562 to perform submodule imports lazily. This dramatically improves import times.
- Updated Plotly.js to version 1.53.0. See the plotly.js CHANGELOG for more information on the numerous new features and bug fixes of this release. The main features of the Plotly.js release are
- Introduce range breaks on date axes (for example, to remove week-ends) via
layout.xaxis.rangebreaks
- Introduce a new unified x (or y) hovermode (
layout.hovermode="x unified"
), in which the hover box shows the information for all traces at a given x (or y) position - Add
node.customdata
andlink.customdata
to sankey traces
- Introduce range breaks on date axes (for example, to remove week-ends) via
- Updated contributing notes for more explanations on how to contribute to plotly.py #2290. Please give feedback on these notes!
- Updated documentation examples #2325, and to show how to color links in Sankey diagrams #2291.
- Special thanks to @SylwiaOliwia2 and @dangercrow for improving our documentation!
px.imshow
now acceptsxarray
inputs, with metadata being used for axis labels, hover and colorbar #2166
- Fixed handling of
opacity
inpx.pie
,px.funnel_area
,px.density_mapbox
,px.funnel
#2317, with thanks to @tvaucher for the contribution!
- The documentation of the API https://plot.ly/python-api-reference/ now documents the full API #2243
- New documentation examples for facets #2235, legend #2227, subplots #2226, axes #2234 and histograms #2242. Thanks to @SylwiaOliwia2 for all these great examples!
- Jupyterlab extension now compatible with both Jupyterlab 1.2 and 2.0 #2261 with thanks to @consideRatio for the contribution!
- Fixed a bug when using boolean values for the color argument of px functions #2127
- Corrected import bug which was occurring with old versions of ipywidgets #2265
- Fixed python 3.8 syntax warning #2262, with thanks to @sgn for the contribution!
- Removed development dependency on
nose
testing framework #2217
- JupyterLab extension now compatible with JupyterLab 2.0 #2245 with thanks to @consideRatio for the contribution!
- Fix build errors in JupyterLab extension by pinning version of
@types/plotly.js
#2223
- Updated Plotly.js to version 1.52.2. See the plotly.js CHANGELOG for more information on bug fixes.
update_annotations
,update_shapes
andupdate_layout_images
now no longer require thepatch
argument, as per the docstring #2167px.defaults
no longer accepts arbitrary keys #2168- better error message when
pandas
is not installed #2125 - support columns of numerical type in
path
argument ofpx.sunburst
/px.treemap
and add values ofcolor
column in hoverlabel forpx.sunburst
/px.treemap
#2133
- Updated Plotly.js to version 1.52.1. See the plotly.js CHANGELOG for more information on numerous new attribute and bug fixes.
- Plotly Express uses the new
legend.title
attribute and so now has shorter tracename
s #2051 - The heuristic used by
px.parallel_categories
to determine which columns of the data frame to draw has been changed and made more configurable with thedimensions_max_cardinality
argument #2102 - The
simple_white
colorbar styling has been streamlined #2110 - The
jupyterlab-plotly
andplotlywidget
JupyterLab extensions should now share code when installed together, resulting in smaller JupyterLab vendor bundle sizes #2103
- Plotly Express
category_orders
are now respected independent of the contents of the data set #2084 go.Scattergl
symbols now accept numeric specification #1928px.scatter
trendline coefficients are now more readable #1984- Built-in cyclical color scales now all have identical start and end points #2016
px.sunburst
andpx.treemap
now accept apath
argument for passing columns of a rectangular dataframe to build the charts #2006px.choropleth
now accepts a user-suppliedgeojson
attribute #2057px.choropleth
andpx.choropleth_mapbox
now acceptfeatureidkey
to specify the GeoJSON field to use to matchlocations
#2057px.choropleth
andpx.choropleth_mapbox
now accept discrete color #2057px.bar_polar
now accepts continuous color #2017- New
layout.uniformtext
attribute allows for automatic standardization of font sizes across bar-like and hierarchical traces. See the plotly.js CHANGELOG for more information
- Fixed improper JSON encoding exception when the
pillow
module not installed #1993
- Updated Plotly.js to version 1.51.2. See the plotly.js CHANGELOG for more information
- The tutorials of the plotly.py documentation are now in the main plotly.py Github repository. Contributions in order to improve or extend the documentation are very welcome!
plotly.express
generated plots no longer have a default height of 600 pixels, instead they inherit the default height of regular figures #1990. To restore the old behavior, setpx.defaults.height=600
once per session, or set theheight
keyword argument to anypx.function()
to 600.
- Fixed a plotly.express input bug when using data frame indices#1934
- Fixed how to display facet labels with plotly express #1966
- Fixed a bug to use correctly the
zmin/zmax
parameter inpx.imshow
for single-channel images #1981 - Clipped docstring width for better display in Jupyterlab #1939. Thank you @joelostblom!
- Fixed a bug in the case of external orca server #1915 thank you @dev-dsp!
- Extended the plotly.express functional API with 7 new functions:
px.pie
,px.sunburst
,px.treemap
,px.funnel
, andpx.funnel_area
(#1909)px.density_mapbox
andpx.choropleth_mapbox
#1937. - plotly.express mapbox functions in plotly.express have new arguments
center
andmapbox_style
#1937. - plotly.express polar plots (
scatter_polar
,line_polar
,bar_polar
) now have arange_theta
keyword argument for representing only an angular section #1969. - All continuous colorscales now accept a
_r
suffix that reverses their direction #1933 - Docstrings of plotly.py are now doctested #1921.
- Reversing a predefined colorscale by appending
_r
to its name #1933
- Updated Plotly.js to version 1.51.1. See the plotly.js CHANGELOG for more information
- Improved propagation of empty templates (#1892)
- Update the
add_annotations
/add_shapes
/add_images
methods to no longer default to adding objects in paper coordinates. This allows plotly.js to determine the default reference frame based on context (#1888) - Use the default template's background color for displaying color swatches (#1872). Special thanks to @joelostblom for this contribution!
- Improved docstrings (#1835, #1837)
- Added image trace type (plotly.js#4289, plotly.js#4307, plotly.js#4313, plotly.js#4319)
- Added matplotlib-style
plotly.express.imshow
convenience function to display images and heatmaps (#1855, #1885) - Added matplotlib-style
simple_white
template (#1864). Special thanks to @joelostblom for this contribution. - Added support for using an externally managed orca server for image export features (#1850). Special thanks to @miriad for this contribution.
- Added facet wrapping support to plotly express functions using the new
facet_col_wrap
argument (#1838)
- Fixed regression in 4.2.0 that caused all figure factories to require that scikit-image be installed (#1832)
- Updated Plotly.js to version 1.50.1. See the plotly.js CHANGELOG for more information
- Added
treemap
trace type (plotly.js#4185, plotly.js#4219, plotly.js#4227, plotly.js#4242) - Added
add_*
/select_*
/for_each_*
/update_*
convenience figure methods for annotations, shapes, and images (#1817) - Added
overwrite
kwarg toupdate*
figure methods to fully replace property values, rather than update them recursively (#1726) - Added
texttemplate
attribute to all traces that support on-graph text (plotly.js#4071, plotly.js#4179) - Added date custom formatting in
hovertemplate
andtexttemplate
e.g.'%{x|%b %-d, %Y}'
(plotly.js#4071) - Added transition support to
bar
trace length, width, on-graph text positioning, marker style and error bars (plotly.js#4180, plotly.js#4186) - Added support for legend scrolling via touch interactions (plotly.js#3873, plotly.js#4214)
- Updated Plotly.js to version 1.49.4. See the plotly.js CHANGELOG for more information
- The width of a figure produced by the
create_gantt
figure factory now resizes responsively (#1724)
- The name of the steps property of
graph_objects.indicator.Gauge
has been renamed fromstepss
tosteps
- Avoid crash in iframe renderers when running outside iPython (#1723)
- Updated Plotly.js to version 1.49.1. See the plotly.js CHANGELOG for more information.
- Bars in the figures produced by the
create_gantt
figure factory may now be hidden by clicking on the legend (#1665). Special thanks to @csabaszan for this contribution! - Improved performance when serializing figures containing large numpy arrays (#1690). Special thanks to @miriad for this contribution!
- Added new renderers for displaying figures from within the Databricks and CoCalc notebook services (#1703)
- Added
indicator
traces (plotly/plotly.js#3978) - Added
choroplethmapbox
traces (plotly/plotly.js#3988) - Added
densitymapbox
traces (plotly/plotly.js#3993) - Added new mapbox
style
values:open-street-map
,carto-positron
,carto-darkmatter
,stamen-terrain
,stamen-toner
,stamen-watercolor
andwhite-bg
that do not require a Mapbox access token (plotly/plotly.js#3987, plotly/plotly.js#4068) - Added support for
sourcetype
valueraster
andimage
andtype
raster
for mapbox layout layers (plotly/plotly.js#4006) - Added
below
attribute toscattermapbox
traces (plotly/plotly.js#4058) - Added support for
below: 'traces'
in mapbox layout layers (plotly/plotly.js#4058) - Added
sourceattribution
attribute to mapbox layout layers (plotly/plotly.js#4069) - Added
labelangle
andlabelside
attributes toparcoords
traces (plotly/plotly.js#3966) - Added
doubleClickDelay
config option (plotly/plotly.js#3991) - Added
showEditInChartStudio
config option (plotly/plotly.js#4061)
- Fixed incorrect facet row ordering in figures generated by plotly.express functions (plotly/plotly_express#129)
- Fixed "The truth value of an array with more than one element is ambiguous" error when specifying subplot titles as numpy array of strings (#1685). Special thanks to @MrQubo for this contribution!
- The
line_3d
plotly express function was not visible by default when importing*
fromplotly.express
(#1667)
This is a major release that includes many new features, and a few breaking changes. See the version 4 announcement for a summary of the important changes.
- Updated Plotly.js to version 1.48.3. See the plotly.js CHANGELOG for more information.
- The Plotly Express tech preview (https://medium.com/@plotlygraphs/introducing-plotly-express-808df010143d) has been integrated as the
plotly.express
module (#1613) - Added a new renderers framework the supports rendering figure in a wide variety of contexts (#1474). See the new Displaying Plotly Figures documentation page for more information.
- Added
plotly.io.write_html
andplotly.io.to_html
functions for exporting figures to HTML (1474). Also available as.write_html
and.to_html
figure methods. - Added new figure methods for batch updating figure properties (
update_layout
,update_traces
,update_xaxes
, etc.) (#1624). See the new Creating and Updating Figures documentation page for more details. - Added support for all trace types in
make_subplots
(#1528) - Added support for secondary y-axes in
make_subplots
(#1564) - Support passing a scalar trace object (rather than a list or tuple of trace objects) as the
data
property to theFigure
constructor (#1614) - Added dictionary-style
.pop
method to graph object classes (#1614) - New
jupyterlab-plotly
JupyterLab extension for rendering figures in JupyterLab. Replaces the@jupyterlab/plotly-extension
extension, and includes JupyterLab 1.0 support. - Added new suite of built-in colorscales to the
plotly.colors
module, and support for specifying this wide range of colorscales by name. Also added support for specifying colorscales as a list of colors, in which case the color spacing is assumed to be uniform (#1647). - Added
sphinx-gallery
renderer for embedding plotly figures in Sphinx-Gallery (#1577, plotly/plotly-sphinx-gallery).
- The follow modules for interfacing with the Chart Studio cloud service have been removed from plotly.py and moved to the new
chart-studio
distribution package. The following modules have been moved to a new top-levelchart_studio
module:plotly.plotly
->chart_studio.plotly
plotly.api
->chart_studio.api
plotly.dashboard_objs
->chart_studio.dashboard_objs
plotly.grid_objs
->chart_studio.grid_objs
plotly.presentation_objs
->chart_studio.presentation_objs
- The legacy
plotly.widgets.GraphWidget
class for displaying online figures hosted by Chart Studio as ipywidgets has been removed. Please use the offline, and much more capable,plotly.graph_objects.FigureWidget
class instead. - The
fileopt
argument tochart_studio.plotly.plot
has been removed, so in-place modifications to previously published figures are no longer supported, and a figure will always overwrite a figure with the same name.
- The
'plotly'
template is used as the default theme across all figures. - In order to reduce the size of the core
plotly
distribution package, the bundled geographic shape files used by thecreate_choropleth
figure factory have been moved to a new optionalplotly-geo
distribution package (1604) - For consistency with other figure factories, the
create_choropleth
andcreate_gantt
figure factories now always returnsFigure
objects, rather than dictionaries (#1600, #1607). - Figure add trace methods (
.add_trace
,.add_traces
,.add_scatter
, etc.) now return a reference to the calling figure, rather than the newly created trace (#1624) plotly.tools.make_subplots
has been moved toplotly.subplots.make_subplots
, though it is still available at the previous location for backward compatibility- The
plotly.graph_objs
module has been moved toplotly.graph_objects
, though it is still available at the previous location for backward compatibility (#1614) - Trace
uid
properties are only generated automatically when a trace is added to aFigureWidget
. When a trace is added to a standardFigure
graph object the inputuid
, if provided, is accepted as is (#1580). datetime
objects that include timezones are not longer converted to UTC (#1581)- When a tuple property (e.g.
layout.annotations
) is updated with a list/tuple that is longer than the current value, the extra elements are appended to the end of the tuple.
- Fixed visibility of
bar
trace error bars in built-in templates (1656)
- Updated Plotly.js to version 1.48.1. See the plotly.js CHANGELOG for more information.
- Added funnel trace (plotly/plotly.js#3817, plotly/plotly.js#3911)
- Added funnelarea traces (#3876, #3912)
- Added support for shared color axes via coloraxis attributes in the layout (#3803, #3786, #3901, #3916)
- Added support for sorting categorical cartesian axes by value (#3864)
- Added
bingroup
tohistogram
,histogram2d
andhistogram2dcontour
to group traces to have compatible auto-bin values (#3845) - Add legend
itemclick
anditemdoubleclick
attributes to set or disable the legend item click and double-click behavior (#3862) - Added support for calling orca through Xvfb to support static image export on Linux when X11 is not available (#1523).
- Fixed
PlotlyJSONEncoder
encoding error whensimplejson
is installed (#1556, #1561) - HTML export now honors the figure height specified in the figure template (#1560)
- Fixed display height of figure displayed in JupyterLab (#1572, #1571)
- Fixed honouring of the
validate=False
option for all renderer types (#1576)
- Updated Plotly.js to version 1.47.4. See the plotly.js CHANGELOG for more information.
- Added "magic underscore" support for specifying nested figure properties (#1534)
- Added
select_traces
,for_each_trace
, andupdate_traces
figure methods for accessing and updating traces by subplot location and trace properties (#1534) - Added
select_*
,for_each_*
, andupdate_*
figure methods for accessing and updating subplot objects (xaxis
,scene
,polar
, etc) (#1548) - Added support for Dash Design Kit style color specifications (#1541). Thanks to @wbrgss for this contribution!
- Added support for the
plotly_unselect
plotly.js event in a newon_unselect
trace method (#1542). Thanks to @denphi for this contribution!
- Changed the default colorscale to be
plasma
for theplotly
,plotly_white
, andplotly_dark
templates for plotly.py version 4 (#1274, #1549) - Reordered the default colorway for the
plotly
,plotly_white
, andplotly_dark
templates for plotly.py version 4 (#1549)
- Fixed package listing in setup.py (#1543). Thanks to @jakevdp for this contribution!
- Fixed built-in templates so that
heatmap
colorscales can be overridden without specifyingautocolorscale=False
(#1454, #1549) - Fix
UnboundLocalError
error in the presence of a missing or corrupt~/.plotly/.config
file (#1551) - Fixed error when combining
sankey
traces with cartesian subplots (#1527, plotly/plotly.js#3802)
- Updated Plotly.js to version 1.47.3. See the plotly.js CHANGELOG for more information.
- Fix MathJax rendering in Firefox (plotly/plotly.js#3783)
- Fix vertical responsive resizing in exported HTML files (#1524, 1525)
- Reverted change to
layout.legend.itemsizing = 'constant'
in built-in templates that was made in 3.8.0. This resulted in unexpectedly large legend entries in some common cases (#1526)
- Updated Plotly.js to version 1.47.1. See the plotly.js CHANGELOG for more information.
- Three new trace types:
sunburst
(plotly/plotly.js#3594),waterfall
(plotly/plotly.js#3531), andvolume
(plotly/plotly.js#3488). - New
plotly.io.to_html
andplotly.io.write_html
functions to export figures as html (#1474). - Added
animation_opts
argument toplotly.offline.plot
andplotly.offline.iplot
to control the auto-play animation settings (#1503). Special thanks to @TakodaS for this contribution!
- Fix race condition when checking the permissions of the
.plotly
settings directory (#1498). Special thanks to @pb-cdunn for this contribution! - Fix
OSError
when processing time series data using Python 3.7+ (#1402, #1501)
- Align hoverlabels left and set legend items to constant-size in builtin themes (#1520)
- Updated Plotly.js to version 1.45.2. See the plotly.js CHANGELOG for more information.
- Added new
auto_play
argument to offlineplot
andiplot
to control whether figures with frames are automatically animated when the figure is loaded (#1447) - Added support for uploading "offline" animations (those with inline data
arrays rather than grid references) to Chart Studio using
plotly.plotly.create_animations
(#1432)
- Updated implementation of the
ternary_contour
figure factory that was added in 3.6.0. The new implementation uses the native plotly.js ternary axes and provides ILR transform support. (#1418)
- Make sure the trace
selectedpoints
property ofFigureWidget
traces is updated on the Python side in response to plotly.js selection events (#1433) - Fix validation for 0-dimensional numpy arrays (#1444). Special thanks to @ankokumoyashi for this contribution!
- Updated Plotly.js to version 1.44.3. See the plotly.js CHANGELOG for more information.
- Crash on import when ipywidgets < 7 installed (#1425)
- Made
scipy
an optional import for the ternary contour figure factory (#1423) - Eliminated use of deprecated
numpy.asscalar
function (#1428)
- Updated Plotly.js to version 1.44.1. Select highlights included below. See the plotly.js CHANGELOG for more information.
- Updated Plotly.js to version 1.44.1. Select highlights included below. See the plotly.js CHANGELOG for more information.
- Add isosurface gl3d trace type (plotly/plotly.js#3438)
- Preview of ternary contour figure factory (#1413). Special thanks to @emmanuelle for this contribution!
- Add support for
line.color
colorbars for scatter3d traces (#1085, plotly/plotly.js#3384) - Add support for
hovertemplate
onscatterpolar
,scatterpolargl
,scatterternary
,barpolar
,choropleth
,scattergeo
, andscattermapbox
trace (plotly/plotly.js#3398, plotly/plotly.js#3436) - Add width attribute to box and violin traces (plotly/plotly.js#3234)
- Add support for
<sup>
,<sup>
,<b>
,<i>
and<em>
pseudo-html tags in extra (aka trace "name") hover labels (plotly/plotly.js#3443) - Add 4 additional colors to the colorway cycle of the plotly themes (#1408)
- Automatically coerce array-like objects (e.g. xarray
DataArray
s) to numpy arrays (#1393). Special thanks to @malmaud for this contribution!
- Fix annotated heatmap text color when values are specified as a nested list (#1300)
- Fix
update
method with legacytitle*
properties (#1403) - Fix deprecation warnings on Python 3.7 and ipywidgets > 7.0 (#1417). Special thanks to @Juanlu001 for this contribution!
- Updated Plotly.js to version 1.43.1. See the plotly.js CHANGELOG for more information.
- Plotly.js 1.43 converted
title
properties (e.g.layout.title
) from strings into compound objects that contain the text as thetext
property along with new title placement attributesx
,y
,xref
,yref
,xanchor
,yanchor
andpad
. Plotly.py 3.5.0 follows the new schema, but still supports specifyingtitle
as a string, in which case the string is assigned to thetitle.text
property (#1302) - Plotly.js 1.43 also moved existing
title*
properties (e.g.layout.titlefont
) under thetitle
object (e.g.layout.title.font
). Plotly.py 3.5.0 follows the new schema, but still supports the legacytitle*
properties by mapping them to the correspondingtitle.*
property (#1302) - The
update
method ongraph_objs
now returns the updated object in order to support chaining multiple update operations together (#1379) - The
show_link
option has been set toFalse
by default in the offlineplot
andiplot
functions. Now that the "send data to cloud" button has been disabled by default in plotly.js 1.43.0, no buttons/links will be displayed by default that result in data being sent off of the local machine (#1304) config
options that are not known by plotly.py result in a warning but are still passed along to plotly.js. Prior to this change these unknown options were dropped silently (#1290)- Built-in themes now specify colorscales using the new global
layout.colorscale
properties. Previously the colorscales were defined for each trace type individually. This reduces the size of the resulting theme files (#1303) - Increased the maximum retry time of the orca integration from 8s to 30s (#1297)
- Fixed
FigureWidget
performance regression that, when working with large datasets, resulted in a slight freeze of the widget after user interactions (pan, zoom, etc) (1305) - Fix orca error when the
ELECTRON_RUN_AS_NODE
environment variable is set (#1293) - The
'responsive'
config key was being silently blocked (#1290) - Fixed error when using unicode characters in string properties on Python 2 (#1289)
- Removed invalid calls to non-existent
validate
andstrip_style
Figure
methods in matplotlylib conversion logic (#1128)
config
options are now supported when usingplotly.offline.iplot
to display a figure in JupyterLab. Requires version 0.18.1 of the@jupyterlab/plotly-extension
extension. (#1281, jupyterlab/jupyter-renderers#168)- Custom
plotly_domain
values are now supported in FigureWidget in both the classic notebook and JupyterLab (#1284)
- Updated Plotly.js to version 1.42.5. See the plotly.js CHANGELOG for more information.
- Fixed histogram binning with pandas
Series
or numpy array (regression introduced in 3.4.0) (#1257, plotly/plotly.js#3211) - Fixed incorrect validation error on the
args
property oflayout.updatemenu.Button()
when value is alist
that starts with alist
(#1265) - Fixed deadlock causing
plotly.io.write_image
to hang on Windows after exporting more than ~25 images (#1255) - Fixed plot display error for
scattergl
trace withmode='lines'
and more than 100k points (#1271) - Fixed responsive resizing error with
iplot
in the classic notebook (#1263)
- Updated Plotly.js to version 1.42.2. Select highlights included below, see the plotly.js CHANGELOG for more information.
- Default figure properties may now be customized using figure templates (themes) and 7 new predefined templates are bundled with plotly.py (#1224)
- Added Parallel Categories (
parcats
) trace type for the visualization of multi-dimensional categorical datasets (plotly/plotly.js#2963) - Added LaTeX typesetting support for figures displayed in the Jupyter
Notebook using
plotly.offline.iplot
andplotly.graph_objs.FigureWidget
. Note: There are still outstanding issues with MathJax rendering in FireFox, but it is now working well in Chrome. (#1243) - Added
include_mathjax
argument toplotly.offline.plot
to support the creation of HTML files with LaTeX typesetting (#1243) - Added new
plotly.offline.get_plotlyjs
function that returns the contents of the bundled plotly.js library as a string (#637, #1246) - Added new
plotly.offline.get_plotlyjs_version
function that returns the version of the bundled plotly.js library (#1246) - HTML div strings returned by
plotly.offline.plot
now contain logic to automatically resize the figure responsively. This logic was previously only added for html files. (#1043, #1234) - Figures displayed using
plotly.offline.iplot
in the classic Jupyter Notebook will now resize responsively (#1234) - Added
'cdn'
,'directory'
, and path stringinclude_plotlyjs
options inplotly.offline.plot
(#1234)- When
'cdn'
, the resulting html file/div includes a script tag reference to the plotlyjs cdn. - When
'directory'
, the resulting html file/div includes a script tag reference to a plotly.min.js bundle in the same directory as the html file. Ifoutput_type
is'file'
then this plotly.min.js bundle is created in the output directory if it doesn't already exist. - When a string ending with
'.js'
, the resulting html file/div includes a script tag that references this exact path. This can be used to point to a plotly.js bundle from an alternative CDN.
- When
- Added a new
color_threshold
argument to thecreate_dendrogram
figure factory to control the dendrogram clustering cutoff (#995, #1075, #1214) - Added support for
autorange='reversed'
in 3D axes (#803, plotly/plotly.js#3141) - Added new gl3d tick and title auto-rotation algorithm that limits text overlaps (plotly/plotly.js#3084, plotly/plotly.js#3131)
- Added
modebar
layout style attributes:orientation
,bgcolor
,color
andactivecolor
(plotly/plotly.js#3068, plotly/plotly.js#3091) - Added
title
,titleposition
andtitlefont
attributes to pie traces (plotly/plotly.js#2987) - Added
hoverlabel.split
attribute toohlc
andcandlestick
traces to split hover labels into multiple pieces (plotly/plotly.js#2959) - Added support for
line.shape
values'hv'
,'vh'
,'hvh'
and'vhv'
inscattergl
traces (plotly/plotly.js#3087) - Added trace, node and link
hoverinfo
forsankey
traces (#3096, #3150) - Added per-sector
textfont
settings in pie traces (#3130)
- Use new Plotly logo in "Produced with Plotly" modebar button (plotly/plotly.js#3068)
- Plotly's use of MathJax for LaTeX typesetting no longer interferes with the Jupyter Notebook's use of MathJax (#445, #360)
- Fixed several issues with the use of
reversescale=True
in thecreate_annotated_heatmap
figure factory (#1251) - Fixed case where
plotly.offline.iplot
would fail to render in the classic Jupyter Notebook if the notebook contained a Markdown headline with the text "Plotly" (#816) None
values in ascatter.hovertext
list are now omitted from the hover label rather than being displayed as the string"None"
(#1244)- Subplot titles created by
plotly.tools.make_subplots
are now positioned properly when customrow_width
/column_width
arguments are specified (#1229) - The
bar.width
property may now be specified as a numpy array or a pandas series (#1231, plotly/plotly.js#3169) - Error bars are now scaled correctly for logarithmic
scatter3d
traces (#1139) - Use
uuid.uuid4
rather thanuuid.uuid1
to work around an upstream Python bug (#1235, #1236) - The
layout.grid.subplots
property may now be specified as a 2D list of subplot identifiers (#1220, #1240) - Fixed
scatter3d
text alignment (#1055, plotly/plotly.js#3180)
For use with JupyterLab, the following versions of the following packages must be installed:
-
Python Packages
- plotly==3.4.0
- ipywidgets>=7.2
- notebook>=5.3
- jupyterlab==0.35
-
JupyterLab Extensions
- plotlywidget@0.5.0
- @jupyter-widgets/jupyterlab-manager@0.38
- @jupyterlab/plotly-extension@0.18
- Updated Plotly.js to version 1.41.3. Select highlights included below, see the plotly.js CHANGELOG for more information.
- Do not create or check permissions on the
~/.plotly
configuration directory until a configuration write operation is performed (#1195). This change avoids some concurrency problems associated with running many instances of plotly.py simultaneously (#1068).
- Enable selection by clicking on points via new layout attribute
clickmode
and flag'select'
(#2944) - Added stacked area charts via new attributes
stackgroup
andstackgaps
in scatter traces (#2960) - Added
barpolar
trace type - which replace and augment area traces (#2954) - Added
polar.hole
layout parameter to punch hole at the middle of polar subplot offsetting the start of the radial range (#2977, #2996) - Figures may now be easily converted to and from JSON using the new
to_json
,from_json
,read_json
, andwrite_json
functions in theplotly.io
package (#1188) - Figures and graph objects now support
deepcopy
andpickle
operations (#1191) - The location of the
"~/.plotly"
settings directory may now be customized using thePLOTLY_DIR
environment variable (#1195) - Added optional
scaleratio
argument to thecreate_quiver
figure factory. When specified, the axes are restricted to this ratio and the quiver arrows are computed to have consistent lengths across angles. (#1197)
- Replace use of
pkg_resources.resource_string
withpkgutil.get_data
to improve compatibility withcx_Freeze
(#1201) - An exception is no longer raised when an optional dependency raises an exception on import. The exception is logged and plotly.py continues as if the dependency were not installed (#1192)
- Fixed invalid dendrogram axis labels when the points being clustered contain duplicate values (#1186)
- Added missing LICENSE.txt file to PyPI source distribution (#765)
For use with JupyterLab, the following versions of the following packages must be installed:
-
Python Packages
- plotly==3.3.0
- ipywidgets>=7.2
- notebook>=5.3
- jupyterlab==0.34
-
JupyterLab Extensions
- plotlywidget@0.4.0
- @jupyter-widgets/jupyterlab-manager@0.37
- @jupyterlab/plotly-extension@0.17
This is a patch release that fixes a few bugs and reintroduces a few version 2 features that were not supported in version 3.
The bundled version of plotly.js remains at 1.40.1
For use with JupyterLab, the following versions of the following packages must be installed:
-
Python Packages
- plotly==3.2.1
- ipywidgets>=7.2
- notebook>=5.3
- jupyterlab==0.34
-
JupyterLab Extensions
- plotlywidget@0.3.0
- @jupyter-widgets/jupyterlab-manager@0.37
- @jupyterlab/plotly-extension@0.17
- An optional
skip_invalid
argument has been added to theFigure
andFigureWidget
constructors. By default,skip_invalid
isFalse
and invalid figure properties will result in an exception (this is identical to the previous behavior). Whenskip_invalid
is set toTrue
, invalid properties will instead be silently ignored. This argument replaces the_raise
argument that was available in version 2, and makes it possible to import figure definitions from different plotly versions, where incompatible properties are ignored rather than causing an exception. - A
to_ordered_dict
method has been added to theFigure
andFigureWidget
classes. This method returns a representation of the figure as a nested structure ofOrderedDict
andlist
instances where the keys in eachOrderedDict
are sorted alphabetically. This method replaces theget_ordered
method that was available in version 2, and makes it possible to traverse the nested structure of a figure in a deterministic order.
- Pandas
Series
andIndex
objects storingdatetime
values were incorrectly cast to numeric arrays (plotly/plotly.py#1160, plotly/plotly.py#1163) - Numpy arrays with
uint64
datatype caused aFigureWidget
error, and no figure was displayed (plotly/plotly.py#1155, plotly/plotly.py#1163)
This release introduces the long-anticipated ability to programmatically export figures as high quality static images in both raster and vector formats.
For use with JupyterLab, the following versions of the following packages must be installed:
-
Python Packages
- plotly==3.2.0
- ipywidgets>=7.2
- notebook>=5.3
- jupyterlab==0.34
-
JupyterLab Extensions
- plotlywidget@0.3.0
- @jupyter-widgets/jupyterlab-manager@0.37
- @jupyterlab/plotly-extension@0.17
- plotly.js version 1.40.1, which introduces the following features:
- Allow
contour
,contourcarpet
andhistogram2dcontour
to have corresponding legend items usingshowlegend
(plotly/plotly.js#2891, plotly/plotly.js#2914) - Add scatterpolar and scatterpolargl attributes
r0
,dr
,theta0
anddtheta
(plotly/plotly.js#2895) - Add layout attributes
piecolorway
andextendpiecolors
for more control over pie colors (plotly/plotly.js#2870) - Add
splom
attributedimensions[i].axis.type
to easily override axis type in splom-generated axes (plotly/plotly.js#2899) - Add support for on-graph text in
scatterpolargl
traces (plotly/plotly.js#2895) - See the plotly.js CHANGELOG for bug fixes and more information.
- Allow
- Support for offline static image export with the
to_image
andwrite_image
functions in the newplotly.io
package (#1120). - New documentation sections covering Static Image Export and Orca Management
- Support for displaying
FigureWidget
instances in static contexts (e.g. nbviewer) just like the built-in ipywidgets (#1117) - Full integration of the Cividis colorscale (#883)
- conda packaging
- From here forward, new versions of plotly.py will be published to the plotly anaconda channel on the same day they are published to PyPI. (72ad0e4)
- The
README
now includes conda installation instructions alongside the pip instructions. - In addition to the existing installation approaches, orca is now also available as a conda package from the plotly anaconda channel.
- Show traces at the top of the Gantt chart's colorbar (#1110)
- Significantly improved validation performance for numeric pandas
Series
objects (#1149) - Specialize auto-generated docstrings for Python syntax
- More robust and specific logic for retrying requests to the plot.ly cloud service (#1146)
- Support basic authentication when using the streaming API behind a proxy server (#1133)
- Validators for
dash
properties (e.g.scatter.line.dash
) incorrectly rejected dash length lists (#1136) - Annotated heatmap error when custom colorscale was specified (#1151)
- Incorrect deprecation warning for deprecated
plotly.graph_objs.Annotations
class (#1138) - Harmless JavaScript console error when opening an html file produced by
plotly.offline.plot
(#1152) - Incorrect validation errors when writing data to the streaming API (#1145)
This release is a minor bug-fix update to version 3.1.0
For use with JupyterLab, the following versions of the following packages must be installed:
-
Python Packages
- plotly==3.1.1
- ipywidgets>=7.2
- notebook>=5.3
- jupyterlab==0.33
-
JupyterLab Extensions
- plotlywidget@0.2.1
- @jupyter-widgets/jupyterlab-manager@0.36
- @jupyterlab/plotly-extension@0.16
- Updated plotly.js to version 1.39.4.
- This is a bug-fix release of plotly.js
- See the plotly.js CHANGELOG for more information
- Fixed error in validation of configkeys plotly/plotly.js#1065
- Fixed error in presentation of named colorscales plotly/plotly.js#1089
- Fixed numerical precision error when using
plotly.tools.make_subplots
to create figures with a large number of subplots plotly/plotly.js#1091 - Fixed problem that prevented the use of the
.update
method to initialize an array property (e.g.layout.shapes
) plotly/plotly.js#1091 - Fixed
FigureWidget
problem causing scroll zoom on 3D plots to stutter plotly/plotly.js#1094 - Fixed invalid
tickmode
property inmatplotlylib
plotly/plotly.js#1101
For use with JupyterLab, the following versions of the following packages must be installed. See README.md for instructions.
-
Python Packages
- plotly==3.1.0
- ipywidgets>=7.2
- notebook>=5.3
- jupyterlab==0.32.1
-
JupyterLab Extensions
- plotlywidget@0.2.0
- @jupyter-widgets/jupyterlab-manager@0.35
- @jupyterlab/plotly-extension@0.16
- Updated Plotly.js to version 1.39.2
- See highlights below
- See the plotly.js CHANGELOG for more information.
- Added 3D streamtube traces plotly/plotly.js#2658
- Added support for on-graph text in scattergl traces
- Added gridshape attribute to polar subplots with values 'circular' (the default) and 'linear' (to draw polygon grids) plotly/plotly.js#2739
This is a minor bug-fix release to 3.0.0
- Several errors related to numbered subplot labels (e.g. xaxis2, polar3, etc.) GH1057
- Error where the
v
property was ignored incone
traces GH1060 - Assorted performance improvements when constructing graph objects GH1061
Note: This release's installation was broken. It has been removed from PyPI
This is a major version with many exciting updates. See the Introducing plotly.py 3.0.0 post for more information.
- Full Jupyter ipywidgets integration with the new
graph_objs.FigureWidget
class FigureWidget
figures can be updated interactively using property assignment syntax- The full trace and layout API is generated from the plotly schema to provide a great experience for interactive use in the notebook
- Support for setting array properties as numpy arrays. When numpy arrays are used, ipywidgets binary serialization protocol is used to avoid converting these to JSON strings.
- Context manager API for animation. Run
help(go.Figure().batch_animate)
for the full doc string. - Perform automatic retries when communicating with plot.ly services. This introduces a new required dependency on the retrying library.
- Improved data validation covering the full API with clear, informative error messages. This means that incorrect properties and/or values now always raise a
ValueError
with a description of the error, the invalid property, and the available properties on the level that it was placed in the graph object. Eg.go.Scatter(foo=123)
raises a validation error. See https://plot.ly/python/reference/ for a reference to all valid properties and values in the Python API. - Error message for
plotly.figure_factory.create_choropleth
is now helpful to Anaconda users who do not have the correct modules installed for the County Choropleth figure factory.
Please see the migration guid for a full list of the changes and deprecations in version 3.0.0
- Updated
plotly.min.js
to version 1.38.0.- New features include a
3D cone
trace to visualize vector fields. - See the plotly.js CHANGELOG for additional information regarding the updates.
- New features include a
- Updated
plotly.min.js
to version 1.37.1.- New features include a
splom
(scatter plot matrix) trace type. - See the plotly.js CHANGELOG for additional information regarding the updates.
- New features include a
- Error message for
plotly.figure_factory.create_choropleth
is more helpful for Windows users on installinggeopandas
and dependencies includingshapely
.
plotly.figure_factory.create_choropleth
now works in Windows without raising an OSError. The module now uses cross-platform path tools fromos
to manipulate and manage the shapefiles contained in this package.
import plotly.figure_factory
does not fail ifpandas
is not installed. See plotly#958
- New parameter
fill_percent
to the.insert
method for the dashboards API. You can now insert a box into the dashboard layout and specify what proportion of the original container box it will occupy. Runhelp(plotly.dashboard_objs.Dashboard.insert)
for more information onfill_percent
.
- Updated
plotly.min.js
to version 1.35.2.- New features include adding an
automargin
attribute to cartesian axes and a layoutgrids
attribute for easy subplot generation. - See the plotly.js CHANGELOG for additional information regarding the updates.
- New features include adding an
plotly.figure_factory.create_choropleth
has changed some of the default plotting options:- 'offline_mode' param has been removed from call signature.
- Persistent selection api for the centroid points is automatically enabled. See https://plot.ly/python/reference/#scatter-selected and https://plot.ly/python/reference/#scatter-unselected for details
- FIPS values that appear on hover are 0-padded to ensure they are 5 digits.
hover_info='none'
is now default for the county lines data.
- The required shapefiles to generate the choropleths via
plotly.figure_factory.create_choropleth
are now shipped in the package data.
- County Choropleth figure factory. Call
help(plotly.figure_factory.create_choropleth)
for examples and how to get started making choropleths of US counties with the Python API.
Note: Calling plotly.figure_factory.create_choropleth
will fail with an IOError due to missing shapefiles see: https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md#241---2018-02-21
- Merged pull request that fixes
GraphWidget
for IPython > v6
- Updated
plotly.min.js
to version 1.33.1.- New plot types include a
violin
trace type. - New features include completely rewritten
scattergl
usingregl
and a completely rewritten polar chart renderer. - See the plotly.js CHANGELOG for additional information regarding the updates.
- New plot types include a
-column_width
and row_width
parameters for plotly.tools.make_subplots
. Call help(plotly.tools.make_subplots)
for documentation.
- Updated
plotly.min.js
to version 1.31.2.- Fixes include adjustments to
table
trace for offline plotting. - See the plotly.js CHANGELOG for additional information regarding the updates.
- Fixes include adjustments to
- Bullet chart figure factory. Call
help(plotly.figure_factory.create_bullet)
for examples and how to get started making bullet charts with the API.
- Presentation objects now added to setup.py
- NEW Presentations API for Python! Run
help(plotly.presentation_objs.Presentations)
for help or check out the new documentation
- Updated
plotly.min.js
to version 1.31.0.- New features include a
table
trace type. - See the plotly.js CHANGELOG for additional information regarding the updates.
- New features include a
- Updated
plotly.min.js
to version 1.31.0 forplotly.offline
.- See the plotly.js CHANGELOG for additional information regarding the updates.
- Updated
plotly.min.js
to version 1.30.0 forplotly.offline
.- See the plotly.js CHANGELOG for additional information regarding the updates.
- Sharekey enabling issue where plots were made private instead of secret.
- Issue removing rug plots from violin plots with multiple traces.
- Updated
plotly.min.js
to version 1.29.1 forplotly.offline
.- See the plotly.js CHANGELOG for additional information regarding the updates.
figure_factory.create_gantt
andfigure_factory.create_dendrogram
now return a Plotly figure (consistent with other figure factory chart types).offline.init_notebook_mode()
is now optional when usingoffline.iplot()
.
- Updated
plotly.min.js
to version 1.28.3 forplotly.offline
.- See the plotly.js CHANGELOG for additional information regarding the updates.
figure_factory.create_facet_grid
now supports histogram, bar, and box traces.
- Updated
plotly.min.js
to version 1.28.1 forplotly.offline
.- See the plotly.js CHANGELOG for additional information regarding the updates.
- The figure_factory can now create facet grids with
.create_facet_grid
. Check it out with:
import plotly.figure_factory as ff
help(ff.create_facet_grid)
- Fixes issue plotly#721. There was an issue when running
import plotly
with old versions of thedecorator
package. We now require installations to use at least version4.0.6
of thedecorator
package. See https://github.com/micheles/decorator/blob/master/CHANGES.md for thedecorator
package changelog.
- 'sort' parameter to
FF.create_violin
to control whether violin plots are sorted alphabetically.
- Beta: Added API methods that wrap the API endpoint for managing Dash objects on plot.ly. The API interface is under
plotly.api.v2.dash_apps
- offline embedded plots are now responsive to window resizing when
output_type == "div"
is set inplotly.offline.iplot()
. - Offline embedded plots are now responsive to window resizing when
output_type == "div"
is set inplotly.offline.iplot()
. - Offline animations are now supported on Plotly Cloud.
- Updated
plotly.min.js
to version 1.26.0 forplotly.offline
.- See the plotly.js CHANGELOG for additional information regarding the updates.
plotly.offline.plot
andplotly.offline.iplot
now accept various configuration options for their arguments.
- Updated
plotly.min.js
to version 1.25.0 forplotly.offline
.- See the plotly.js CHANGELOG for additional information regarding the updates.
- Added check to verify the share key is enabled when secret charts are created.
- Added a new mimetype 'text/vnd.plotly.v1+html' for
iplot
outputs.
import plotly
was broken in2.0.3
and2.0.2
because the newdashboard_objs
wasn't included in oursetup.py
's "packages
". Now it is andimport plotly
and the other features introduced in2.0.3
and2.0.2
should work.
Note: This release's installation was broken. It has been removed from PyPI
- Added
dashboard_objs
to top level import.
Note: This release's installation was broken. It has been removed from PyPI
- Dashboards can now be created using the API and uploaded to Plotly. Use
import plotly.dashboard_objs
to create aDashboard
object. You can learn more aboutDashboard
objects by runninghelp(plotly.dashboard_objs)
andhelp(plotly.plotly.plotly.dashboard_ops)
for uploading and retrieving dashboards from the cloud.
- Offline plots created with
plotly.offline.plot
now resize as expected when the window is resized. plotly.figure_factory.create_distplot
now can support more than 10 traces without raising an error. Updated so that if the list ofcolors
(default colors too) is less than your number of traces, the color for your traces will loop around to start when it hits the end.
- Support for rendering plots in nteract! See nteract/nteract#662 for the associated PR in nteract.
- As part of the above, plotly output now prints with a custom mimetype -
application/vnd.plotly.v1+json
memoize
decorator added toplotly.utils
- a
Grid
fromplotly.grid_objs
now accepts apandas.Dataframe
as its argument. - computationally-intensive
graph_reference
functions are memoized.
plotly.exceptions.PlotlyRequestException
is always raised for network failures. Previously either aPlotlyError
,PlotlyRequestException
, or arequests.exceptions.ReqestException
could be raised. In particular, scripts which depend ontry-except
blocks containing network requests should be revisited.plotly.py:sign_in
now validates to the plotly server specified in your config. If it cannot make a successful request, it raises aPlotlyError
.plotly.figure_factory
will raise anImportError
ifnumpy
is not installed.plotly.figure_factory.create_violin()
now has arugplot
parameter which determines whether or not a rugplot is draw beside each violin plot.
plotly.tools.FigureFactory
. Useplotly.figure_factory.*
.- (optional imports)
plotly.tools._*_imported
It was private anyhow, but now it's gone. (e.g.,_numpy_imported
) - (plotly v2 helper)
plotly.py._api_v2
It was private anyhow, but now it's gone.
- Python 3.5 has been added as a tested environment for this package.
plotly.plotly.create_animations
andplotly.plotly.icreate_animations
now return appropriate error messages if the response is not successful.frames
are now integrated into GRAPH_REFERENCE and figure validation.
- The plot-schema from
https://api.plot.ly/plot-schema
is no longer updated on import.
- Updated
plotly.min.js
to version 1.20.5 forplotly.offline
.- See the plotly.js CHANGELOG for additional information regarding the updates.
FF.create_scatterplotmatrix
now by default does not show the trace labels for the box plots, only ifdiag=box
is selected for the diagonal subplot type.
- The
link text
in the bottom right corner of the offline plots now properly displaysExport to [Domain Name]
for the given domain name set in the users'.config
file.
FF.create_violin
andFF.create_scatterplotmatrix
now by default do not print subplot grid information in output- Removed alert that occurred when downloading plot images offline. Please note: for higher resolution images and more export options, consider making requests to our image servers. See:
help(py.image)
for more details.
- Plot configuration options for offline plots. See the list of configuration options and examples for more information.
- Please note that these configuration options are for offline plots ONLY. For configuration options when embedding online plots please see our embed tutorial.
colors.py
file which contains functions for manipulating and validating colors and arrays of colors- 'scale' param in
FF.create_trisurf
which now can set the interpolation on the colorscales - animations now work in offline mode. By running
plotly.offline.plot()
andplotly.offline.iplot()
with afig
withframes
, the resulting plot will cycle through the figures defined inframes
either in the browser or in an ipython notebook respectively. Here's an example:
import IPython.display
from IPython.display import display, HTML
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
init_notebook_mode(connected=True)
figure_or_data = {'data': [{'x': [1, 2], 'y': [0, 1]}],
'layout': {'xaxis': {'range': [0, 3], 'autorange': False},
'yaxis': {'range': [0, 20], 'autorange': False},
'title': 'First Title'},
'frames': [{'data': [{'x': [1, 2], 'y': [5, 7]}]},
{'data': [{'x': [-1, 3], 'y': [3, 9]}]},
{'data': [{'x': [2, 2.6], 'y': [7, 5]}]},
{'data': [{'x': [1.5, 3], 'y': [7.5, 4]}]},
{'data': [{'x': [1, 2], 'y': [0, 1]}],
'layout': {'title': 'End Title'}}]}
iplot(figure_or_data)
More examples can be found at https://plot.ly/python/animations/.
- animations now work in online mode: use
plotly.plotly.create_animations
andplotly.plotly.icreate_animations
which animate a figure with theframes
argument. Here is a simple example:
import plotly.plotly as py
from plotly.grid_objs import Grid, Column
column_1 = Column([0.5], 'x')
column_2 = Column([0.5], 'y')
column_3 = Column([1.5], 'x2')
column_4 = Column([1.5], 'y2')
grid = Grid([column_1, column_2, column_3, column_4])
py.grid_ops.upload(grid, 'ping_pong_grid', auto_open=False)
# create figure
figure = {
'data': [
{
'xsrc': grid.get_column_reference('x'),
'ysrc': grid.get_column_reference('y'),
'mode': 'markers',
}
],
'layout': {'title': 'Ping Pong Animation',
'xaxis': {'range': [0, 2], 'autorange': False},
'yaxis': {'range': [0, 2], 'autorange': False},
'updatemenus': [{
'buttons': [
{'args': [None],
'label': u'Play',
'method': u'animate'}
],
'pad': {'r': 10, 't': 87},
'showactive': False,
'type': 'buttons'
}]},
'frames': [
{
'data': [
{
'xsrc': grid.get_column_reference('x2'),
'ysrc': grid.get_column_reference('y2'),
'mode': 'markers',
}
]
},
{
'data': [
{
'xsrc': grid.get_column_reference('x'),
'ysrc': grid.get_column_reference('y'),
'mode': 'markers',
}
]
}
]
}
py.create_animations(figure, 'ping_pong')
- Trisurf now uses correct
Plotly Colorscales
when called - Fixed a bug in the format of unique-identifiers in columns of grids that are uploaded to plotly via
plotly.plotly.upload
. See plotly#599 for details. In particular, creating plots that are based off of plotly grids is no longer broken. Here is an example:
import plotly.plotly as py
from plotly.grid_objs import Grid, Column
c1 = Column([6, 6, 6, 5], 'column 1')
c2 = Column(['a', 'b', 'c', 'd'], 'column 2')
g = Grid([c1, c2])
# Upload the grid
py.grid_ops.upload(g, 'my-grid', auto_open=False)
# Make a graph that with data that is referenced from that grid
trace = Scatter(xsrc=g[0], ysrc=g[1])
url = py.plot([trace], filename='my-plot')
Then, whenever you update the data in 'my-grid'
, the associated plot will update too. See https://plot.ly/python/data-api for more details on usage and examples.
- the colorbar in
.create_trisurf
now displays properly inoffline mode
.
- the colorbar in
.create_trisurf
now displays the appropriate max and min values on the ends of the bar which corresponding to the coloring metric of the figure edges_color
is now a param in.create_trisurf
which only takesrgb
values at the moment
- Fixed color bug with trisurf plots where certain triangles were colored strangely. The coordinates of
rgb(...)
are now rounded to their nearest integer (using Python3 method of rounding), then placed in the color string to fix the issue.
- Edited
plotly.min.js
due to issue usingiplot
to plot offline in Jupyter Notebooks- Please note that
plotly.min.js
may be cached in your Jupyter Notebook. Therefore, if you continue to experience this issue after upgrading the Plotly package please open a new notebook or clear the cache to ensure the correctplotly.min.js
is referenced.
- Please note that
- Updated
plotly.min.js
from 1.14.1 to 1.16.2- Trace type scattermapbox is now part of the main bundle
- Add updatemenus (aka dropdowns) layout components
- See the plotly.js CHANGELOG for additional information regarding the updates
.create_trisurf
now supports a visible colorbar for the trisurf plots. Check out the docs for help:
import plotly.tools as tls
help(tls.FigureFactory.create_trisurf)
- The FigureFactory can now create 2D-density charts with
.create_2D_density
. Check it out with:
import plotly.tools as tls
help(tls.FigureFactory.create_2D_density)
- Updated
plotly.min.js
from 1.13.0 to 1.14.1- Numerous additions and changes where made to the mapbox layout layers attributes
- Attribute line.color in scatter3d traces now support color scales
- Layout shapes can now be moved and resized (except for 'path' shapes) in editable contexts
- See the plotly.js CHANGELOG for additional information regarding the updates
- Updated
default-schema
- Added
update_plotlyjs_for_offline
in makefile in order to automate updatingplotly.min.js
for offline mode
- Updated plotly.min.js so the offline mode is using plotly.js v1.13.0
- Fix
Plotly.toImage
andPlotly.downloadImage
bug specific to Chrome 51 on OSX - Beta version of the scattermapbox trace type - which allows users to create mapbox-gl maps using the plotly.js API. Note that scattermapbox is only available through custom bundling in this release.
- See the plotly.js CHANGELOG for additional additions and updates.
- Fix
- The FigureFactory can now create gantt charts with
.create_gantt
. Check it out with:
import plotly.tools as tls
help(tls.FigureFactory.create_gantt)
- Ability to download images in offline mode. By providing an extra keyword
image
to the existing plot calls, you can now download the images of the plots you make in offline mode.
- Fixed check for the height parameter passed to
_plot_html
, and now sets the correctlink text
for plots generated in offline mode.
- The FigureFactory can now create violin plots with
.create_violin
. Check it out with:
import plotly.tools as tls
help(tls.FigureFactory.create_violin)
- Added ability to enable/disable SSL certificate verification for streaming. Disabling SSL certification verification requires Python v2.7.9 / v3.4.3 (or above). This feature can be toggled via the
plotly_ssl_verification
configuration setting.
-
Changed the default option for
create_distplot
in the figure factory fromprobability
toprobability density
and also added thehistnorm
parameter to allow the user to choose between the two options. Note: This is a backwards incompatible change. -
Updated plotly.min.js so the offline mode is using plotly.js v1.12.0
- Light position is now configurable in surface traces
- surface and mesh3d lighting attributes are now accompanied with comprehensive descriptions
-
Allowed
create_scatterplotmatrix
andcreate_trisurf
to use divergent and categorical colormaps. The parameterpalette
has been replaced bycolormap
anduse_palette
has been removed. Increate_scatterplotmatrix
, users can now:- Input a list of different color types (hex, tuple, rgb) to
colormap
to map colors divergently - Use the same list to categorically group the items in the index column
- Pass a singlton color type to
colormap
to color all the data with one color - Input a dictionary to
colormap
to map index values to a specific color - 'cat' and 'seq' are valid options for
colormap_type
, which specify the type of colormap being used
- Input a list of different color types (hex, tuple, rgb) to
-
In
create_trisurf
, the parameterdist_func
has been replaced bycolor_func
. Users can now:- Input a list of different color types (hex, tuple, rgb) to
colormap
to map colors divergently - Input a list|array of hex and rgb colors to
color_func
to assign each simplex to a color
- Input a list of different color types (hex, tuple, rgb) to
- Added the option to load plotly.js from a CDN by setting the parameter
connected=True
in theinit_notebook_mode()
function call - The FigureFactory can now create trisurf plots with
.create_trisurf
. Check it out with:
import plotly.tools as tls
help(tls.FigureFactory.create_trisurf)
- Version 1.9.13 fixed an issue in offline mode where if you ran
init_notebook_mode
more than once the function would skip importing (because it saw that it had already imported the library) but then accidentally clear plotly.js from the DOM. This meant that if you raninit_notebook_mode
more than once, your graphs would not appear when you refreshed the page. Version 1.9.13 solved this issue by injecting plotly.js with every iplot call. While this works, it also injects the library excessively, causing notebooks to have multiple versions of plotly.js inline in the DOM, potentially making notebooks with manyiplot
calls very large. Version 1.10.0 brings back the requirement to callinit_notebook_mode
before making aniplot
call. It makesinit_notebook_mode
idempotent: you can call it multiple times without worrying about losing your plots on refresh.
- Fixed issue in offline mode related to the inability to reload plotly.js on page refresh and extra init_notebook_mode calls.
- SSL support for streaming.
- The FigureFactory can now create scatter plot matrices with
.create_scatterplotmatrix
. Check it out with:
import plotly.tools as tls
help(tls.FigureFactory.create_scatterplotmatrix)
- Updated plotly.min.js so the offline mode is using plotly.js v1.10.0
- Added beta versions of two new 2D WebGL trace types: heatmapgl, contourgl
- Added fills for scatterternary traces
- Added configurable shapes layer positioning with the shape attribute:
layer
- Fixed
require is not defined
issue when plotting offline outside of Ipython Notebooks.
- Error no longer results from a "Run All" cells when working in a Jupyter Notebook.
- Updated plotly.min.js so offline is using plotly.js v1.9.0
- Added Ternary plots with support for scatter traces (trace type
scatterternary
, currently only available in offline mode) - For comprehensive update list see the plotly.js CHANGELOG
- Added Ternary plots with support for scatter traces (trace type
- Offline mode will no longer delete the Jupyter Notebook's require, requirejs, and define variables.
- Updated plotly.min.js so offline is using plotly.js v1.8.0
- Added range selector functionality for cartesian plots
- Added range slider functionality for scatter traces
- Added custom surface color functionality
- Added ability to subplot multiple graph types (SVG cartesian, 3D, maps, pie charts)
- For comprehensive update list see the plotly.js CHANGELOG
- Updated plotly.min.js so offline is using plotly.js v1.5.2
- Offline matplotlib to Plotly figure conversion. Use
offline.plot_mpl
to convert and plot a matplotlib figure as a Plotly figure independently of IPython/Jupyter notebooks or useoffline.iplot_mpl
to convert and plot inside of IPython/Jupyter notebooks. Additionally, useoffline.enable_mpl_offline
to convert and plot all matplotlib figures as plotly figures inside an IPython/Jupyter notebook. See examples below:
An example independent of IPython/Jupyter notebooks:
from plotly.offline import init_notebook_mode, plot_mpl
import matplotlib.pyplot as plt
init_notebook_mode()
fig = plt.figure()
x = [10, 15, 20]
y = [100, 150, 200]
plt.plot(x, y, "o")
plot_mpl(fig)
An example inside of an IPython/Jupyter notebook:
from plotly.offline import init_notebook_mode, iplot_mpl
import matplotlib.pyplot as plt
init_notebook_mode()
fig = plt.figure()
x = [10, 15, 20]
y = [100, 150, 200]
plt.plot(x, y, "o")
iplot_mpl(fig)
An example of enabling all matplotlib figures to be converted to Plotly figures inside of an IPython/Jupyter notebook:
from plotly.offline import init_notebook_mode, enable_mpl_offline
import matplotlib.pyplot as plt
init_notebook_mode()
enable_mpl_offline()
fig = plt.figure()
x = [10, 15, 20, 25, 30]
y = [100, 250, 200, 150, 300]
plt.plot(x, y, "o")
fig
- Offline plotting now works outside of the IPython/Jupyter notebook. Here's an example:
from plotly.offline import plot
from plotly.graph_objs import Scatter
plot([Scatter(x=[1, 2, 3], y=[3, 1, 6])])
This command works entirely locally. It writes to a local HTML file with the necessary plotly.js code to render the graph. Your browser will open the file after you make the call.
The call signature is very similar to plotly.offline.iplot
and plotly.plotly.plot
and plotly.plotly.iplot
, so you can basically use these commands interchangeably.
If you want to publish your graphs to the web, use plotly.plotly.plot
, as in:
import plotly.plotly as py
from plotly.graph_objs import Scatter
py.plot([Scatter(x=[1, 2, 3], y=[5, 1, 6])])
This will upload the graph to your online plotly account.
- Check for
no_proxy
when determining if the streaming request should pass through a proxy in the chunked_requests submodule. Example:no_proxy='my_stream_url'
andhttp_proxy=my.proxy.ip:1234
, thenmy_stream_url
will not get proxied. Previously it would.
Bug Fix: Previously, the "Export to plot.ly" link on
offline charts would export your figures to the
public plotly cloud, even if your config_file
(set with plotly.tools.set_config_file
to the file
~/.plotly/.config
) set plotly_domain
to a plotly enterprise
URL like https://plotly.acme.com
.
This is now fixed. Your graphs will be exported to your
plotly_domain
if it is set.
- The FigureFactory can now create annotated heatmaps with
.create_annotated_heatmap
. Check it out with:
import plotly.tools as tls
help(tls.FigureFactory.create_annotated_heatmap)
- The FigureFactory can now create tables with
.create_table
.
import plotly.tools as tls
help(tls.FigureFactory.create_table)
- Previously, using plotly offline required a paid license.
No more:
plotly.js
is now shipped inside this package to allow unlimited free use of plotly inside the ipython notebook environment. Theplotly.js
library that is included in this package is free, open source, and maintained independently on GitHub at https://github.com/plotly/plotly.js. - The
plotly.js
bundle that is required for offline use is no longer downloaded and installed independently from this package:plotly.offline.download_plotlyjs
is deprecated. - New versions of
plotly.js
will be tested and incorporated into this package as new versioned pip releases;plotly.js
is not automatically kept in sync with this package.
- Big data warning mentions
plotly.graph_objs.Scattergl
as possible solution.
- If you're behind a proxy, you can make requests by setting the environmental variable HTTP_PROXY and HTTPS_PROXY (http://docs.python-requests.org/en/v1.0.4/user/advanced/#proxies). This didn't work for streaming, but now it does.
- Sometimes creating a graph with a private share-key doesn't work - the graph is private, but not accessible with the share key. Now we check to see if it didn't work, and re-try a few times until it does.
- The FigureFactory can now create dendrogram plots with
.create_dendrogram
.
- Saving "world_readable" to your config file via
plotly.tools.set_config
actually works.
- You can also save
auto_open
andsharing
to the config file so that you can forget these keyword argument inpy.iplot
andpy.plot
.
- Fixed validation errors (validate=False workaround no longer required)
- Auto-sync API request on import to get the latest schema from Plotly
.
-access for nested attributes in plotly graph objects- General
.help()
method for plotly graph objects - Specific attribute
.help(<attribute>)
also included
- No more is streamable, streaming validation.
- Fixed typos in
plot
andiplot
documentations
- CHANGELOG
sharing
keyword argument forplotly.plotly.plot
andplotly.plotly.iplot
with options'public' | 'private' | 'secret'
to control the privacy of the charts. Depreciatesworld_readable
- If the response from
plot
oriplot
contains an error message, raise an exception
-
height
andwidth
are no longer accepted iniplot
. Just stick them into your figure's layout instead, it'll be more consistent when you view it outside of the IPython notebook environment. So, instead of this:py.iplot([{'x': [1, 2, 3], 'y': [3, 1, 5]}], height=800)
do this:
py.iplot({ 'data': [{'x': [1, 2, 3], 'y': [3, 1, 5]}], 'layout': {'height': 800} })
- The height of the graph in
iplot
respects the figure's height in layout