Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Wrong y-values when using bar graph #180

Open
m23chaffee opened this issue Jan 11, 2023 · 1 comment
Open

Wrong y-values when using bar graph #180

m23chaffee opened this issue Jan 11, 2023 · 1 comment

Comments

@m23chaffee
Copy link

m23chaffee commented Jan 11, 2023

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()`

@nicolaskruchten
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants