Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Basthon
Basthon Kernel
Commits
67724380
Commit
67724380
authored
Dec 12, 2022
by
Romain Casati
Browse files
Python3: plotly: better init startegy.
parent
28ede9e7
Pipeline
#556566
passed with stages
in 14 minutes and 39 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
packages/kernel-python3/src/basthon/_patch_modules.py
View file @
67724380
...
...
@@ -361,7 +361,6 @@ def patch_drawSvg(drawSvg):
def
patch_plotly
(
plotly
):
import
js
import
os
import
plotly.io
as
pio
# expose define and require
js
.
eval
(
"""
...
...
@@ -373,6 +372,5 @@ window.require = window.requirejsVars?.require;
# (plotly.js already downloaded)
os
.
environ
[
"PLOTLY_RENDERER"
]
=
"notebook"
# activate the default renderer
# (don't really understand why this is needed)
pio
.
renderers
[
pio
.
renderers
.
default
].
activate
()
from
plotly.offline
import
init_notebook_mode
init_notebook_mode
(
connected
=
False
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment