0

I have a pandas DataFrame and, I could make a sex-age swarm plot (picture have two columns male and female). and also diabetes-age swarm plot (two columns yes and no)

How could I make a swarm plot with four columns:

male&yes male&no female&yes female&no

moshtaba
  • 381
  • 1
  • 8

1 Answers1

1

You could use the hue parameter of sbn.swarmplot:

g = sbn.swarmplot(x="Gender", y="Age", hue="Diabetes", data=data, dodge=True, size=10)

This gives:

enter image description here

Michael Mitter
  • 545
  • 3
  • 9