Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add 'frames' to the ipython display_bundle #738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 8 additions & 1 deletion plotly/offline/offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion plotly/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.0.7'
__version__ = '2.0.8'