class seaborn.objects.Range(artist_kws=<factory>, color=<'C0'>, alpha=<1>, linewidth=<rc:lines.linewidth>, linestyle=<rc:lines.linestyle>)#

An oriented line mark drawn between min/max values.

This mark defines the following properties:

color, alpha, linewidth, linestyle


This mark will often be used in the context of a stat transform that adds an errorbar interval:

    so.Plot(penguins, x="body_mass_g", y="species", color="sex")
    .add(so.Dot(), so.Agg(), so.Dodge())
    .add(so.Range(), so.Est(errorbar="sd"), so.Dodge())

One feature (or potential gotcha) is that the mark will pick up properties like linestyle and linewidth; exclude those properties from the relevant layer if this behavior is undesired:

    so.Plot(penguins, x="sex", y="body_mass_g", linestyle="species")
    .add(so.Line(marker="o"), so.Agg())
    .add(so.Range(), so.Est(errorbar="pi"))

It’s also possible to directly assign the minimum and maximum values for the range:

    .pipe(so.Plot, ymin="bill_depth_mm", ymax="bill_length_mm", x="penguin")
    .add(so.Range(), color="island", linewidth="body_mass_g")
    .scale(x=so.Continuous().tick(count=0), linewidth=(.5, 1.5))
    .facet(row="species", col="sex")
    .layout(size=(8, 4))
    .label(x="", y="Size (mm)")