0

I need to plot one categorical variable over multiple numeric variables.

My DataFrame looks like this:

 party media_user business_user POLI mass 0 Party_a 0.513999 0.404201 0.696948 0.573476 1 Party_b 0.437972 0.306167 0.432377 0.433618 2 Party_c 0.519350 0.367439 0.704318 0.576708 3 Party_d 0.412027 0.253227 0.353561 0.392207 4 Party_e 0.479891 0.380711 0.683606 0.551105 

And I would like a scatter plot with different colors for the different variables; eg. one plot per party per [media_user, business_user, POLI, mass] each in different color.

So like this just with scatters instead of bars:

bar chart

The closest I've come is this

sns.catplot(x="party", y="media_user", jitter=False, data=sns_df, height = 4, aspect = 5); 

producing:

cat_scat_plot

1 Answer 1

2

By messing around with some other graphs I found that by simply adding linestyle = '' I could remove the line and add markers. Hope this may help somebody else!

sim_df.plot(figsize = (15,5), linestyle = '', marker = 'o') 

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.