3 回答

TA贡献1785条经验 获得超8个赞
我想要更多关于 polty、Jupyterlab 等版本的信息,但iplot()很可能是这里的问题。尝试另一个基本示例,例如:
代码:
import plotly.graph_objects as go
animals=['giraffes', 'orangutans', 'monkeys']
fig = go.Figure(data=[
go.Bar(name='SF Zoo', x=animals, y=[20, 14, 23]),
go.Bar(name='LA Zoo', x=animals, y=[12, 18, 29])
])
# Change the bar mode
fig.update_layout(barmode='stack')
fig.show()
阴谋:
让我知道这对你有什么影响。

TA贡献1775条经验 获得超8个赞
你可以试试这个 Google Colab 已经给出了重新分级 Plotly 的指令
def configure_plotly_browser_state():
import IPython
display(IPython.core.display.HTML('''
<script src="/static/components/requirejs/require.js"></script>
<script>
requirejs.config({
paths: {
base: '/static/base',
plotly: 'https://cdn.plot.ly/plotly-1.5.1.min.js?noext',
},
});
</script>
'''))
调用此函数 configure_plotly_browser_state()
添加回答
举报