question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lineplot incorrectly attempts sort my already sorted data

See original GitHub issue

Whenever I try to lineplot my DataFrame, seaborn decides by default that it gets to decide that it isn’t sorted, plotting my data from left to right instead of start to finish, the way it is indexed, leading to weird zig zags in otherwise smooth data.

Why is sort=True enabled by default? DataFrames are indexed by very design, trying to guess what I’m using as my index defeats the purpose of even indexing my DataFrame

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
AlLongleycommented, Jan 10, 2019

Could you explain what you mean by Y as a function of X? That would imply Y being dependent, the documentation depicts an example of what I’m trying to do as a sequential list of independent co-ordinates

x, y = np.random.randn(2, 5000).cumsum(axis=1)
ax = sns.lineplot(x=x, y=y, sort=False, lw=1)
0reactions
zoe1337commented, Sep 28, 2022

I’m facing the same issue. sort=False has no effect, using Seaborn 0.12.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Seaborn Lineplot incorrectly attempts sort my already ...
Whenever I try to lineplot my DataFrame, seaborn decide by default that it gets to decide that it isn't sorted, plotting my data...
Read more >
[Code]-Seaborn Lineplot incorrectly attempts sort my already sorted ...
Whenever I try to lineplot my DataFrame, seaborn decide by default that it gets to decide that it isn't sorted, plotting my data...
Read more >
A Complete Guide to Line Charts | Tutorial by Chartio
Line charts are a fundamental chart type generally used to show change in values across time. Learn how to best use this chart...
Read more >
Using line charts - Amazon QuickSight - AWS Documentation
Then the audience won't try to interpret the numbers. ... Sorting visual data in Amazon QuickSight ... Both lines are now visible. To...
Read more >
Choosing the Correct Type of Regression Analysis
Hi jim , I am dealing with a regression problem predicting rejection rate of a product after ordered. due to 95% of products...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found