From b6bedc05d04caebcb1521610fc1aa5d93231cd80 Mon Sep 17 00:00:00 2001 From: Samuel Loury Date: Thu, 17 Mar 2016 08:26:19 +0100 Subject: [PATCH] Require plotly before attempting to show a plot When refreshing a notebook, some plot may not be shown because the plotly initialization script did not finish before the plot was shown. It results in a console error like 'Plotly is not defined'. This patch fixes this error by making every plot require plotly. --- plotly/offline/offline.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plotly/offline/offline.py b/plotly/offline/offline.py index 6981bead02c..8ead7764648 100644 --- a/plotly/offline/offline.py +++ b/plotly/offline/offline.py @@ -127,9 +127,11 @@ def _plot_html(figure_or_data, show_link, link_text, 'class="plotly-graph-div">' '' '' '').format( id=plotdivid, script=script,