New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default style for more than 6 data series #1513
Comments
So there's a few related but distinguishable questions here:
This kind of issue is what I was talking about in the release notes when I said "default behavior may change" because i'm interested in hearing what people find surprising or annoying. My current thoughts are
|
Apologies I didn't notice the other issue. For my purposes, I didn't need dashes so I can just turn it off, but I think at least a more informative error message would be nice. Rather than "randomly" cycling through dash/markers, what if you define a more predictable pattern? Co-vary the two by some amount? Or turning dashes off by default so that users won't be surprised with an error if they are just trying out a generic plot. |
It's possible in principle but I'm not convinced it's a good idea. So e.g. you can programmatically generate markers with an arbitrary number of sides. But it's really hard to discriminate exactly how many sides the markers have above ~5. And once you get above ~7 it's very hard to tell that it's a polygon and not a circle. Similarly, you could programmatically generate dashes with slightly longer and longer solid segments, but for most plots it will be impossible to tell which is which. These points depends on things like size and density, so it's possible to make a custom plot that works. But I don't think it's a great approach to defaults. |
If somebody is trying to add additional styles to default 6 styles:
Styles tuple must have even number of elements (segment, gap) |
sns.scatterplot with a dataframe with more than 6 columns of data has the same problem, it runs out of markers. |
I think the error message is also a little unintuitive. Perhaps it could be changed to something clearer, e.g.
instead of
At first, I thought the categorical column values were missing dashes in the strings, which was quite confusing. An alternative possibility to this issue is to wrap around the |
I tried this but it didn't work (for lineplot):
produced: even worst
Any other ideas? |
For sns.lineplot, I'm just dynamically disabling markers if there would be more than six; example:
|
Hi all,
Just using the
lineplot
example but extending this to 8 series:I get this exception, which seems to indicate that I need to specify styles for data series beyond the 6th.
Is there a way to automatically set style for large datasets?
[Edit] Seems like it's because relational.py:30 defines 6 default dashes. Setting
sns.lineplot(data=data, dashes=False)
fixes the issue.The text was updated successfully, but these errors were encountered: