Pair plot#
A pair plot shows scatter plots for every pair of numeric columns, with histograms along the diagonal. Useful for quickly exploring relationships across multiple variables.
gufo.pairplot(df).show()
Color by category#
gufo.pairplot(df, color="species").show()
Column subset#
By default, all numeric columns are included. Use columns to limit which
variables appear.
gufo.pairplot(df, columns=["sepal_length", "sepal_width", "petal_length"]).show()
Saving and customization#
pairplot() returns a Grid, so all grid methods work:
gufo.pairplot(df, color="species").title("Iris Dataset").save("pairs.png", dpi=300)
API reference#
- gufo.layout.pairplot.pairplot(data, columns=None, *, color=None, figsize=None)[source]#
Create a pair plot grid from columnar data.
Generates an NxN grid where diagonal cells show histograms and off-diagonal cells show scatter plots for every pair of numeric columns.
Parameters#
- dataDataFrame, dict, or similar
The data source. Must have named columns.
- columnslist of str or None
Which columns to include. If None, all numeric columns are used automatically.
- colorstr or None
Column name for categorical color encoding. Applied to all panels.
- figsizetuple or None
Figure size as (width, height). Defaults to (n*3, n*3).
Returns#
- Grid
A Grid instance ready for .show() or .save().