File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 3030 _matplotlib_imported = False
3131
3232__PLOTLY_OFFLINE_INITIALIZED = False
33- __PLOTLY_USE_CDN = False
3433
3534
3635def download_plotlyjs (download_url ):
@@ -53,14 +52,17 @@ def init_notebook_mode(connected=False):
5352 Initialize plotly.js in the browser if it hasn't been loaded into the DOM
5453 yet. This is an idempotent method and can and should be called from any
5554 offline methods that require plotly.js to be loaded into the notebook dom.
55+
56+ Keyword arguments:
57+
58+ connected (default=False) -- if connected is True, this means that the
59+ plotly.js library will be loaded from a CDN(online) rather than the
60+ local file from pip.
5661 """
5762 if not _ipython_imported :
5863 raise ImportError ('`iplot` can only run inside an IPython Notebook.' )
5964
6065 global __PLOTLY_OFFLINE_INITIALIZED
61- global __PLOTLY_USE_CDN
62-
63- __PLOTLY_USE_CDN = connected
6466
6567 if connected :
6668 # Inject plotly.js into the output cell
@@ -76,7 +78,7 @@ def init_notebook_mode(connected=False):
7678 'function(plotly) {window.Plotly=plotly;});'
7779 '}}'
7880 '</script>'
79- )
81+ )
8082 else :
8183 # Inject plotly.js into the output cell
8284 script_inject = (
You can’t perform that action at this time.
0 commit comments