Skip to content

Commit

Permalink
Merge pull request plotly#379 from joshburkart/patch-1
Browse files Browse the repository at this point in the history
Change to offline.init_notebook_mode()
  • Loading branch information
jackparmer committed Feb 23, 2016
2 parents e3b0167 + 577177c commit 283ba58
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions plotly/offline/offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,16 @@ def init_notebook_mode():
from IPython.display import HTML, display

global __PLOTLY_OFFLINE_INITIALIZED
if not __PLOTLY_OFFLINE_INITIALIZED:
display(HTML('<script type="text/javascript">' +
# ipython's includes `require` as a global, which
# conflicts with plotly.js. so, unrequire it.
'require=requirejs=define=undefined;' +
'</script>' +
'<script type="text/javascript">' +
get_plotlyjs() +
'</script>'))
__PLOTLY_OFFLINE_INITIALIZED = True
display(HTML('<script type="text/javascript">' +
# ipython's includes `require` as a global, which
# conflicts with plotly.js. so, unrequire it.
'require=requirejs=define=undefined;' +
'</script>' +
'<script type="text/javascript">' +
get_plotlyjs() +
'</script>'))


def _plot_html(figure_or_data, show_link, link_text,
Expand Down

0 comments on commit 283ba58

Please sign in to comment.