Skip to content

Commit d323fa6

Browse files
committed
BUG: Fix plot not shown in VSCode Jupyter
Fixes #695
1 parent a3ba8a7 commit d323fa6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

backtesting/_plotting.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
encoding='utf-8') as _f:
4747
_AUTOSCALE_JS_CALLBACK = _f.read()
4848

49-
IS_JUPYTER_NOTEBOOK = 'JPY_PARENT_PID' in os.environ
49+
IS_JUPYTER_NOTEBOOK = ('JPY_PARENT_PID' in os.environ or
50+
'inline' in os.environ.get('MPLBACKEND', ''))
5051

5152
if IS_JUPYTER_NOTEBOOK:
5253
warnings.warn('Jupyter Notebook detected. '

0 commit comments

Comments
 (0)