For a jointplot marginal plot can I use percentage to show in every item (color, hue )?

131 Views Asked by At

I think default is counts, but if I have 2+dimensions with different sample size, see the attachment image. How to make that distribution for each Name, individually? Since quite different sample size hard to tell anything.percentile would be better.

this is it

my code:

#import 
from faker import Faker
import pandas as pd
import numpy as np
import seaborn as sns
Faker = Faker('En-US')
Name = Faker.name()

#Crate fake data
m1 = pd.DataFrame({'Name':Name,'X':[np.random.normal(3,100) for i in range(1000)],'Y':[np.random.normal(7,100) for i in range(1000)]})
m2 = pd.DataFrame({'Name':Faker.name(),'X':[np.random.normal(50,20) for i in range(50)],'Y':[np.random.normal(-10,100) for i in range(50)]})
df = pd.concat([m1,m2])
sns.jointplot(data=df,x='X',y='Y',hue='Name')

let me know if this is clear please. I'm a beginner. enter image description here

0

There are 0 best solutions below