File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -60,15 +60,16 @@ def init_notebook_mode():
6060 from IPython .display import HTML , display
6161
6262 global __PLOTLY_OFFLINE_INITIALIZED
63+ if not __PLOTLY_OFFLINE_INITIALIZED :
64+ display (HTML ('<script type="text/javascript">' +
65+ # ipython's includes `require` as a global, which
66+ # conflicts with plotly.js. so, unrequire it.
67+ 'require=requirejs=define=undefined;' +
68+ '</script>' +
69+ '<script type="text/javascript">' +
70+ get_plotlyjs () +
71+ '</script>' ))
6372 __PLOTLY_OFFLINE_INITIALIZED = True
64- display (HTML ('<script type="text/javascript">' +
65- # ipython's includes `require` as a global, which
66- # conflicts with plotly.js. so, unrequire it.
67- 'require=requirejs=define=undefined;' +
68- '</script>' +
69- '<script type="text/javascript">' +
70- get_plotlyjs () +
71- '</script>' ))
7273
7374
7475def _plot_html (figure_or_data , show_link , link_text ,
You can’t perform that action at this time.
0 commit comments