seaborn.objects.Dots#

class seaborn.objects.Dots(artist_kws=<factory>, marker=<rc:scatter.marker>, pointsize=<4>, stroke=<0.75>, color=<'C0'>, alpha=<1>, fill=<True>, fillcolor=<depend:color>, fillalpha=<0.2>)#

A dot mark defined by strokes to better handle overplotting.

This mark defines the following properties:

marker, pointsize, stroke, color, alpha, fill, fillcolor, fillalpha

See also

Dot

A mark suitable for dot plots or less-dense scatterplots.

Examples

This mark draws relatively small, partially-transparent dots:

p1 = so.Plot(mpg, "horsepower", "mpg")
p1.add(so.Dots())
../_images/objects.Dots_1_0.png

Fixing or mapping the color property changes both the stroke (edge) and fill:

p1.add(so.Dots(), color="origin")
../_images/objects.Dots_3_0.png

These properties can be independently parametrized (although the resulting plot may not always be clear):

(
    p1.add(so.Dots(fillalpha=.5), color="origin", fillcolor="weight")
    .scale(fillcolor="binary")
)
../_images/objects.Dots_5_0.png

Filled and unfilled markers will happily mix:

p1.add(so.Dots(stroke=1), marker="origin").scale(marker=["o", "x", (6, 2, 1)])
../_images/objects.Dots_7_0.png

The partial opacity also helps to see local density when using jitter:

(
    so.Plot(mpg, "horsepower", "origin")
    .add(so.Dots(), so.Jitter(.25))
)
../_images/objects.Dots_9_0.png