4.4.1 Scatter Plot
import seaborn as sns # import the library
plt.style.use('seaborn-pastel') # set the style and color palette
# set the font size and figure size at once
plt.rcParams.update({'font.size': 18,'figure.figsize':(8, 6)})1. Simple Scatterplot
tips = sns.load_dataset("tips") # load the embedded dataset
# Draw a simple scatter plot between two variables
sns.scatterplot(x="total_bill", y="tip", data=tips,s = 80)
2. Differentiate groups by color

3. Differentiate groups by color and marker


4. Categorical Scatterplot

5. Differentiate the quantitative variable by size

6. Differentiate the quantitative variable by size and color

7. More complex

Last updated