Bar Plot does Not display properly in browser but show up properly in Jupyter Notebook but

30 views Asked by At

I made a bar plot that shows up perfectly in jupyter notebook, but it doesn’t work in browser (ran it with VSCode). Can anyone share some insights? The packages are updated.enter image description here

enter image description here

The code in VScode is listed as following:

bar_fig=go.Figure()

Category=list(df_agg_melt.Category.unique())

bar_fig=px.bar(df_agg_melt, x="Category", y="Percentage", color="Response", facet_col="Course", barmode="group",
                category_orders={
                    "Category": Category,
                    "Response": ['Have', 'Could Include'],
                    "Course":['PSYCH100', 'PSYCH100v2']
                })
bar_fig.update_layout(width=1800, height=800)

# Show the chart
bar_fig.show()
0

There are 0 answers