Skip to content
Advertisement

plotly python how to show bars where y values are zero

I would like to still show all x axis values even when the y values are zero for that bar. What am I doing wrong here?

JavaScript

enter image description here

As you can see, x axis threshold one = 55% is missing from the x axis, but I would like it to still be there even though the y values are 0.

Thanks in advance

Advertisement

Answer

Use px.bar instead of px.histogram.

JavaScript

enter image description here

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement