changing the marker size in python seaborn lmplot

I know this question specifies lmplot but thought I would add an answer for how to do this with a seaborn scatterplot.

df = sns.load_dataset("anscombe")
sp = sns.scatterplot(x="x", y="y", hue="dataset", data=df)

enter image description here

And to change the size of the points you use the s parameter

sp = sns.scatterplot(x="x", y="y", hue="dataset", data=df, s=100)

enter image description here


You want to use scatter_kws={"s": 100}

As in:

lm = sns.lmplot(x = "totalX", y = "NormI", hue = "Data Type", data = df, palette="Set1", legend_out=False, scatter_kws={"s": 100})

You can amend the integer value (currently 100) to change the size of the markers.

I don't know what your hue or palette data are, but this should work nonetheless.

Tags:

Python

Seaborn