All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
- 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 ofOrdererdDict
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 occured 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