File tree 1 file changed +9
-8
lines changed
Filter options
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():
60
60
from IPython .display import HTML , display
61
61
62
62
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>' ))
63
72
__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>' ))
72
73
73
74
74
75
def _plot_html (figure_or_data , show_link , link_text ,
You can’t perform that action at this time.
0 commit comments