plotly.py
plotly.py copied to clipboard
px.area has inconsistent behaviour, showing wrong data compared to px.line
These two plots are created using the same dataframe. Line plot is correct, the area plot is not. Hover data in orange line is correct, but with incorrect position in Y axis
Sample code is simple:
fig1 = px.line(df, x='pos', y='counts', color='kit', width= 1200, height=400, template= 'simple_white')
fig2 = px.area(df, x='pos', y='counts', color='kit', width= 1200, height=400, template= 'simple_white')
Hi @MauroIb I'm not getting the same error you're getting. I used your code, and the y axis data in the area plot seems to be working fine. Can you please show exactly where you think the error appears?
import plotly.express as px
import pandas as pd
df = pd.read_csv("bug_data.csv")
fig1 = px.line(df, x='pos', y='counts', color='kit', width= 1200, height=400, template= 'simple_white')
fig2 = px.area(df, x='pos', y='counts', color='kit', width= 1200, height=400, template= 'simple_white')
fig1.show()
fig2.show()
Hi - we are tidying up stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. If you'd like to submit a PR, we'd be happy to prioritize a review, and if it's a request for tech support, please post in our community forum. Thank you - @gvwilson