class seaborn.objects.Shift(x=0, y=0)#

Displacement of all marks with the same magnitude / direction.

x, yfloat

Magnitude of shift, in data units, along each axis.


Use this transform to layer multiple marks that would otherwise overlap and be hard to interpret:

    so.Plot(penguins, "species", "body_mass_g")
    .add(so.Dots(), so.Jitter())
    .add(so.Range(), so.Perc([25, 75]), so.Shift(x=.2))

For y variables with a nominal scale, bear in mind that the axis will be inverted and a positive shift will move downwards:

    so.Plot(diamonds, "carat", "clarity")
    .add(so.Dots(), so.Jitter())
    .add(so.Range(), so.Perc([25, 75]), so.Shift(y=.25))