From 76492b60c1393198f8774e639c9ce70c5484c051 Mon Sep 17 00:00:00 2001 From: tarzzz Date: Fri, 21 Apr 2017 10:15:00 +0530 Subject: [PATCH 1/2] Add to the ipython display_bundle --- plotly/offline/offline.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plotly/offline/offline.py b/plotly/offline/offline.py index a390fcb24d8..e8fa27b2020 100644 --- a/plotly/offline/offline.py +++ b/plotly/offline/offline.py @@ -351,8 +351,15 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly', cls=plotly.utils.PlotlyJSONEncoder)) layout = _json.loads(_json.dumps(figure.get('layout', {}), cls=plotly.utils.PlotlyJSONEncoder)) + frames = _json.loads(_json.dumps(figure.get('frames', None), + cls=plotly.utils.PlotlyJSONEncoder)) + + fig = {'data': data, 'layout': layout} + if frames: + fig['frames'] = frames + display_bundle = { - 'application/vnd.plotly.v1+json': {'data': data, 'layout': layout}, + 'application/vnd.plotly.v1+json': fig, 'text/html': plot_html, 'text/vnd.plotly.v1+html': plot_html } From 354ccbd1ee3cb69890d4c096b98b689aa77742cb Mon Sep 17 00:00:00 2001 From: tarzzz Date: Fri, 21 Apr 2017 13:04:44 +0530 Subject: [PATCH 2/2] Changelog + version bump --- CHANGELOG.md | 3 ++- plotly/version.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41f851b133e..9301acb80dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -## [Unreleased] +## [2.0.8] - 2017-04-21 ### Added - offline embedded plots are now responsive to window resizing when `output_type == "div"` is set in `plotly.offline.iplot()`. +- Offline animations are now supported on Plotly Cloud. ### Updated - `plotly.offline.plot` and `plotly.offline.iplot` now accept various [configuration options](https://plot.ly/javascript/configuration-options/) for their arguments. diff --git a/plotly/version.py b/plotly/version.py index 4b259db3eea..2940e26c288 100644 --- a/plotly/version.py +++ b/plotly/version.py @@ -1 +1 @@ -__version__ = '2.0.7' +__version__ = '2.0.8'