Python 3.x 当我再次关闭和打开笔记本时,在Jupyter笔记本中没有获得绘图?

Python 3.x 当我再次关闭和打开笔记本时,在Jupyter笔记本中没有获得绘图?,python-3.x,Python 3.x,我使用jupyter笔记本中的plotly库创建了许多图形。我保存了文件并退出。当我再次打开jupyter笔记本时,我的图形没有出现?我需要再次运行代码,以便恢复图形。此外,我已将保存的ipynb文件发送给我的朋友,但他无法看到情节。有什么建议吗 我使用了py.offline.init\u笔记本模式(connected=True) 请分享有问题的代码,不要看代码,我可以根据经验猜测。。。您记得使用plotly.offline.plot吗?@ItamarMushkin代码粘贴请告知。。我过去一直在

我使用jupyter笔记本中的plotly库创建了许多图形。我保存了文件并退出。当我再次打开jupyter笔记本时,我的图形没有出现?我需要再次运行代码,以便恢复图形。此外,我已将保存的ipynb文件发送给我的朋友,但他无法看到情节。有什么建议吗

我使用了py.offline.init\u笔记本模式(connected=True)


请分享有问题的代码,不要看代码,我可以根据经验猜测。。。您记得使用plotly.offline.plot吗?@ItamarMushkin代码粘贴请告知。。我过去一直在搞阴谋。仅当我重新打开记事本时,您似乎忘记了init\u notebook\u模式下的
(connected=True)

import plotly.plotly as py
import cufflinks as cf
import plotly as py
import plotly.graph_objs as go
import ipywidgets as widgets
import numpy as np
from scipy import special
import datetime
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
import plotly.figure_factory as ff
init_notebook_mode
from math import floor
from plotly import tools
from plotly.graph_objs import *
from IPython.display import display
import plotly.tools as tls
import json
import math
from plotly.widgets import GraphWidget
import plotly.io as pi



data = [go.Bar(
            x = dplot['Boxoffice_US_Mil'],
            y = dplot['dircount'],
            orientation = 'h',
            marker = dict(
            color = 'rgb(67,262,402)'))]

# Declaring the Title and margins

layout = dict(
        title = 'Average Box Office collections by Director who have directed more than 3 movies',
        margin = go.Margin(
        l = 210,
        r = 100,
        pad = 1),
        xaxis = dict(
            title = 'Average Box Office Collection (US mil)'),

        yaxis = dict(
            title = '              Director (Number of Movies)',
            tickfont = dict(
                size = 12,)))

fig = go.Figure(data = data, layout = layout)
iplot(fig)