3 回答

TA貢獻(xiàn)1785條經(jīng)驗(yàn) 獲得超8個(gè)贊
我想要更多關(guān)于 polty、Jupyterlab 等版本的信息,但iplot()很可能是這里的問題。嘗試另一個(gè)基本示例,例如:
代碼:
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()
陰謀:
讓我知道這對(duì)你有什么影響。

TA貢獻(xiàn)1775條經(jīng)驗(yàn) 獲得超8個(gè)贊
你可以試試這個(gè) Google Colab 已經(jīng)給出了重新分級(jí) 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>
'''))
調(diào)用此函數(shù) configure_plotly_browser_state()
添加回答
舉報(bào)