@@ -273,7 +273,7 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly',
273
273
validate = True , image = None , filename = 'plot_image' , image_width = 800 ,
274
274
image_height = 600 ):
275
275
"""
276
- Draw plotly graphs inside an IPython or Jupter notebook without
276
+ Draw plotly graphs inside an IPython or Jupyter notebook without
277
277
connecting to an external server.
278
278
To save the chart to Plotly Cloud or Plotly Enterprise, use
279
279
`plotly.plotly.iplot`.
@@ -337,22 +337,9 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly',
337
337
338
338
figure = tools .return_figure_from_figure_or_data (figure_or_data , validate )
339
339
340
- # Display 2 versions of the figure:
341
- # - The raw HTML is the "old-school" style - we just throw in a JS script
342
- # inside the cell. This works for a lot of environments but some JS is
343
- # stripped out in some rendering environments / platforms like
344
- # GitHub, nteract, and eventually Plotly
345
- # - The custom `mime-types` is the new-school way. nteract supports
346
- # rendering plotly graphs this way (see https://github.com/nteract/nteract/pull/662)
347
- # and others will hopefully follow suite.
348
- # Both of these bundles will be saved as part of the notebook. The renderer
349
- # will choose which one to render. So 'text/html' is like a fallback for
350
- # any environment that doesn't have the 'application/json+plotly.v1'
351
- # renderer available.
352
- # The bummer is that we're injecting the figure JSON in here twice, so
353
- # notebooks that are pretty big are about to get a lot bigger.
354
- # The upside is that we're dropping any compatability for older notebook
355
- # versions
340
+ # Though it can add quite a bit to the display-bundle size, we include
341
+ # multiple representations of the plot so that the display environment can
342
+ # choose which one to act on.
356
343
data = _json .loads (_json .dumps (figure ['data' ],
357
344
cls = plotly .utils .PlotlyJSONEncoder ))
358
345
layout = _json .loads (_json .dumps (figure .get ('layout' , {}),
0 commit comments