Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 76492b6

Browse filesBrowse files
committed
Add to the ipython display_bundle
1 parent 8eafa68 commit 76492b6
Copy full SHA for 76492b6

File tree

Expand file treeCollapse file tree

1 file changed

+8
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-1
lines changed

‎plotly/offline/offline.py

Copy file name to clipboardExpand all lines: plotly/offline/offline.py
+8-1Lines changed: 8 additions & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.