Skip to content

Commit 0d469e7

Browse files
author
Jing Liu
committed
improved output message
1 parent 4b1830b commit 0d469e7

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

analysis/python/set_matplotlib_backend.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,14 @@ def can_access(url, timeout=1.0):
1717
except Exception:
1818
return False
1919

20-
setting = '''"jupyter.widgetScriptSources": [
21-
"jsdelivr.com",
22-
"unpkg.com"
23-
],'''
24-
2520
def _set_matplotlib_backend():
2621
if 'ipykernel' in sys.modules:
2722
if any('vscode' in mod for mod in sys.modules):
2823
if can_access('https://cdn.jsdelivr.net'):
2924
matplotlib.use('module://ipympl.backend_nbagg')
30-
else:
31-
if can_access('https://8.8.8.8'):
32-
print("Consider adding")
33-
print(setting)
34-
print("in your user settings for interactive plot")
25+
print("Interactive plot is enabled.")
26+
print('Select "Enable Downloads" if you are asked,')
27+
print("and restart the kernel (maybe a few times) to let it take effect.")
3528
else: # in jupyter notebook
3629
matplotlib.use('module://ipympl.backend_nbagg')
3730

0 commit comments

Comments
 (0)