Visualize a continuous variable against a binary variable I want to visualize a continuous variable, BMI index, against a binary variable, heart disease.
I want to check by visualization in my data, if heart disease is more common among higher BMI index cases than lower BMI. I used catplot boxplot:
Plot = sns.catplot(x="heart_disease", y="bmi", kind="box", 
                   data=data);
Plot.fig.suptitle('Correlation between Heart Disease and 
                   BMI index', size=15, y=1.12);

From the result plot, the question to the answer is no. Do you think using boxplot is a good idea? is there another plot type that could do a better job for the question at hand ?


Depending on the sample size, you might do a strip plot (where every observation is a dot in the graph), maybe with jittering or transparent points.
I second Stephen's recommendation of using splines -- the box plot you've shown seems to show that the median and quartiles are roughly similar, but that the outliers are quite different. Oddly, the high outliers all show no heart disease.  Was N much larger for that group?
