Reputation: 2246
The scatterplot from seaborn produces dots with a small white boarder. This is helpful if there are a few overlapping dots, but it becomes visually noisy once there are many overlaying dots. How can the white borders be removed?
import seaborn as sns; sns.set()
import matplotlib.pyplot as plt
tips = sns.load_dataset("tips")
ax = sns.scatterplot(x="total_bill", y="tip", data=tips)
Upvotes: 17
Views: 15198
Reputation: 347
Try passing the argument edgecolor='none'
or edgecolor=None
into sns.scatterplot()
Upvotes: 4
Reputation: 3598
Instead of edgecolors use linewidth = 0
:
import seaborn as sns; sns.set()
import matplotlib.pyplot as plt
tips = sns.load_dataset("tips")
ax = sns.scatterplot(x="total_bill", y="tip", data=tips, linewidth=0)
Upvotes: 23
Reputation: 4275
If you check searbon documentation, it accepts matplotlib keywords (listed kwargs in seaborn functions' documentaion), therefore, you can either pass, as sugested by @Allan Bruno edgecolor = 'none'
, edgecolor = None
(singular, not 'edgecolors'), or linewidth = 0
Output:
Upvotes: 6