plotly_express icon indicating copy to clipboard operation
plotly_express copied to clipboard

Wrong y-values when using bar graph

Open m23chaffee opened this issue 2 years ago • 1 comments

I'm trying to make a bar graph using this data value: image

however, when I plot it using plotly express, some of the values are getting doubled, or tripled and it is being stacked together like this: image

I'm checking every documentation for error but it seems I am the first one to encountered it.

Here's the source code for the graph:

`#putting user interface using plotly

fig = px.bar(alloy, x = "Alloy Number", y = "Elastic Modulus", barmode = 'group', width = 1000, height =500, color_discrete_sequence = px.colors.qualitative.Pastel, ) fig.show()`

m23chaffee avatar Jan 11 '23 01:01 m23chaffee

This is intentional: the default barmode is stacked so as to avoid not noticing that there are multiple values at the same x position.

nicolaskruchten avatar Jan 24 '23 17:01 nicolaskruchten