3

I want to plot a graph that is similar to the picture as shown in (https://i.stack.imgur.com/URtfp.png) using python. Could you please show me how to do that? Thank you very much

1 Answers1

0

The seaborn jointplot function provides output similar to this if you use the hue parameter.

import seaborn as sns
tips = sns.load_dataset('tips')
g = sns.jointplot(data=tips, x="total_bill", y="tip", hue="smoker")
import matplotlib.pyplot as plt
plt.show()
dat
  • 1,580
  • 1
  • 21
  • 30