Commit 67724380 authored by Romain Casati's avatar Romain Casati
Browse files

Python3: plotly: better init startegy.

parent 28ede9e7
Pipeline #556566 passed with stages
in 14 minutes and 39 seconds
......@@ -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)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment