escodrinyar.Layout.__add__#

Layout.__add__(other)#

Add a plot in the same row as the current layout.

Parameters:
other: Plot | Layout

The plot or layout to add.

Returns:
Layout

The layout with the added plot.

Examples

import escodrinyar as sc
import seaborn.objects as so
import seaborn as sns
penguins = sns.load_dataset("penguins")
points = (
    sc.Plot(
        data=penguins,
        x="flipper_length_mm",
        y="bill_length_mm",
        color="species"
    )
    .add(so.Dot())
)

chull = (
    sc.Plot(
        data=penguins,
        x="flipper_length_mm",
        y="bill_length_mm",
        color="species"
    )
    .add(sc.ConvexHull(edgewidth=1))
)
points + chull
../../_images/Layout.__add___3_01.png
(points + chull).opts(
    figsize=(10, 5)
)
../../_images/Layout.__add___4_01.png