Skip to content

Commit 2be151e

Browse files
authored
Merge pull request #738 from plotly/issue-737
Add 'frames' to the ipython display_bundle
2 parents 7347564 + 354ccbd commit 2be151e

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5-
## [Unreleased]
5+
## [2.0.8] - 2017-04-21
66
### Added
77
- offline embedded plots are now responsive to window resizing when `output_type == "div"` is set in `plotly.offline.iplot()`.
8+
- Offline animations are now supported on Plotly Cloud.
89

910
### Updated
1011
- `plotly.offline.plot` and `plotly.offline.iplot` now accept various [configuration options](https://plot.ly/javascript/configuration-options/) for their arguments.

plotly/offline/offline.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,15 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly',
351351
cls=plotly.utils.PlotlyJSONEncoder))
352352
layout = _json.loads(_json.dumps(figure.get('layout', {}),
353353
cls=plotly.utils.PlotlyJSONEncoder))
354+
frames = _json.loads(_json.dumps(figure.get('frames', None),
355+
cls=plotly.utils.PlotlyJSONEncoder))
356+
357+
fig = {'data': data, 'layout': layout}
358+
if frames:
359+
fig['frames'] = frames
360+
354361
display_bundle = {
355-
'application/vnd.plotly.v1+json': {'data': data, 'layout': layout},
362+
'application/vnd.plotly.v1+json': fig,
356363
'text/html': plot_html,
357364
'text/vnd.plotly.v1+html': plot_html
358365
}

0 commit comments

Comments
 (0)