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()
添加回答
舉報