Seaborn how to use keyword arguments in catplot or pointplot

Viewed 119

I am trying to pass keyword arguments into a Seaborn catplot (or pointplot), but it is not having any effect. Examples below try to set edge color to black. Both produce the same plot, which doesn't have any edge color. Using Seaborn 0.11.1

penguins = sns.load_dataset("penguins")
colormap = {"Adelie": "purple", "Chinstrap": "orange", "Gentoo": "green"}

### Try 1
sns.catplot(
    kind="point",
    data=penguins,
    x="island",
    y="bill_depth_mm",
    hue="species",
    palette=colormap,
    scatter_kws = {"edgecolor":'black'}
)

### Try 2
sns.catplot(
    kind="point",
    data=penguins,
    x="island",
    y="bill_depth_mm",
    hue="species",
    palette=colormap,
    edgecolor='black',
)

enter image description here

The end goal is to "hack" hollow points by using something like this:

sns.catplot(
    kind="point",
    data=penguins,
    x="island",
    y="bill_depth_mm",
    hue="species",
    palette=colormap,
    ec=penguins["species"].map(colormap),
    fc="none",
)
1 Answers

I think edgecolor dosen't work with all plots type

i have tried it with scatterplot and it works, (like in the picture) but with pointplot or others it dosen't work i think enter image description here

Related