Skip to content

figure not rendered in jupyter notebook with default renderer #4960

Open
@rra88

Description

@rra88

Running the example code below (from https://plotly.com/python/graph-objects/) in a jupyter notebook, the figure does not render. Overriding the default renderer like so
fig.show(renderer='iframe')
causes the figure to render, but I want to use the default renderer.


df = pd.DataFrame({
  "Fruit": ["Apples", "Oranges", "Bananas", "Apples", "Oranges", "Bananas"],
  "Contestant": ["Alex", "Alex", "Alex", "Jordan", "Jordan", "Jordan"],
  "Number Eaten": [2, 1, 3, 1, 3, 2],
})
import plotly.express as px

fig = px.bar(df, x="Fruit", y="Number Eaten", color="Contestant", barmode="group")
fig.show()

The packages of the environment I used: package_list.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2considered for next cyclebugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions