0

I am trying to plot a swarmplot using categorical variables in the X-Y axis. I used melt to make a dataframe that looks like this:

Day Condition Category value 4 WT cat1 96.0 4 WT cat1 74.0 7 WT cat1 48.0 7 WT cat1 79.0 10 WT cat1 29.0 10 WT cat1 49.0 4 WT cat2 50.0 4 WT cat2 57.0 4 WT cat2 57.0 7 WT cat2 75.0 7 WT cat2 49.0 10 WT cat2 51.0 10 WT cat2 71.0 4 WT cat3 19.0 4 WT cat3 14.0 7 WT cat3 54.0 7 WT cat3 30.0 ... 

I would like to get a swarmplot showing the 'Category' in the y-axis and the 'Day' in the x-axis. In addition, the number of observations (Column 'value') should correspond to dots in every category per day.

Any help is highly appreciated,

1
  • Did you try something? Could you please share your attempt? Commented Jun 5, 2019 at 16:19

1 Answer 1

2

IIUC,

sns.swarmplot(x='Day', y='value', hue='Category', data=df) 

Output:

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.