With recent story versions (I'm on 4.1.0 ), it's easier than ever.
import plotly.graph_objects as go animals=['giraffes', 'orangutans', 'monkeys'] fig = go.Figure([go.Bar(x=animals, y=[20, 14, 23])]) fig.show()

If you want to switch between, say, Jupyterlab and your web browser, you can set this up first using import plotly.io as pio and pio.renderers.default = 'jupyterlab or pio.renderers.default = 'browser' , respectively.
import plotly.graph_objects as go import plotly.io as pio pio.renderers.default = 'browser' animals=['giraffes', 'orangutans', 'monkeys'] fig = go.Figure([go.Bar(x=animals, y=[20, 14, 23])]) fig.show()
source share