Note
Go to the end to download the full example code.
12.3.10.10.4. Scatterplot#
<seaborn.axisgrid.FacetGrid object at 0x000002CC04431E80>
import seaborn as sns
sns.set_theme(style="white")
# Load the example mpg dataset
mpg = sns.load_dataset("mpg")
# Plot miles per gallon against horsepower with other semantics
sns.relplot(
x="horsepower",
y="mpg",
hue="origin",
size="weight",
sizes=(40, 400),
alpha=0.5,
palette="muted",
height=6,
data=mpg,
)
Total running time of the script: (0 minutes 0.526 seconds)