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.

Stripplot edgecolor uses different palette for first category

See original GitHub issue

I’d like to create a stripplot like this one, but with edgecolor specified by a palette: this one

Here is my attempt:

import seaborn as sns
df = sns.load_dataset("tips")
ax = sns.stripplot(x="sex", y="tip", hue="day", data=df, jitter=True, edgecolor=sns.color_palette("hls", 4), facecolors="none", split=False, alpha=0.7)

But the resulting figure uses a different palette for the first category and the legend than what I tried to specify: stripplot_test

Is this expected behavior or a bug?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:16 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
jnothmancommented, Aug 30, 2017

Would it be appropriate to support edgecolor='hue'?

1reaction
mwaskomcommented, Jun 21, 2018

Closing because this works:

ax = sns.stripplot(x="sex", y="tip", hue="day", data=tips,
                   marker="$\circ$", size=10,
                   jitter=True, alpha=0.7)

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Seaborn stripplot set edgecolor based on hue/palette
But the color palettes for male and female appear to be different. How do I use the same color palette for both categories?...
Read more >
seaborn.stripplot — seaborn 0.12.1 documentation - PyData |
Single color for the elements in the plot. palettepalette name, list, or dict. Colors to use for the different levels of the hue...
Read more >
Python Seaborn Tutorial - GeeksforGeeks
Color Palette. Colormaps are used to visualize plots effectively and easily. One might use different sorts of colormaps for different kinds of ...
Read more >
Seaborn Tutorial | Kaggle
When there are multiple observations in each category, it also uses bootstrapping to compute a ... sns.stripplot(x=auto["body-style"] ,palette="Set1", ...
Read more >
seaborn — BLOG - Nikki Marinsek
I first made the plot when I was trying to illustrate the variability in ... Normally I would use a strip plot with...
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