【发布时间】:2019-03-18 10:01:38
【问题描述】:
如果使用以下代码运行 jupyter 笔记本(使用 nbconvert --execute),我有点困惑为什么会发生这种情况:
for key in dict:
data = [go.Bar (x = dict[key].values(),
y = dict[key].keys(),
orientation = 'h')]
layout = go.Layout(title = key, showlegend = False)
fig = go.Figure(data = data, layout = layout)
plotly.offline.plot(fig, filename= plots_path + key + '_plotly.html')
总是会导致启动 vs-code。 有没有人遇到过这个问题? 我该如何抑制它,因为我在循环中进行绘图,并且每次运行后关闭 10 多个 vs-code 窗口非常烦人。
如果我将最后一行注释掉,没有弹出 vs-code 窗口,显然它必须与写入 html 的内容有关。
【问题讨论】:
标签: python visual-studio-code jupyter-notebook plotly nbconvert