Skip to content

Commit f65724f

Browse files
committed
🔧 Clean up some comments.
1 parent bf6d796 commit f65724f

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

plotly/offline/offline.py

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly',
273273
validate=True, image=None, filename='plot_image', image_width=800,
274274
image_height=600):
275275
"""
276-
Draw plotly graphs inside an IPython or Jupter notebook without
276+
Draw plotly graphs inside an IPython or Jupyter notebook without
277277
connecting to an external server.
278278
To save the chart to Plotly Cloud or Plotly Enterprise, use
279279
`plotly.plotly.iplot`.
@@ -337,22 +337,9 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly',
337337

338338
figure = tools.return_figure_from_figure_or_data(figure_or_data, validate)
339339

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.
356343
data = _json.loads(_json.dumps(figure['data'],
357344
cls=plotly.utils.PlotlyJSONEncoder))
358345
layout = _json.loads(_json.dumps(figure.get('layout', {}),

0 commit comments

Comments
 (0)