How to make a Pair Plot in Plots.jl?

Hey @dave7895 and @FPGro - super appreciate your answers! That did trick! For anyone else curious, here is how I plotted a pair plot

using DataFrames
using Plots

df = rand(5, 5) * 10 |> DataFrame

function pairplot(df)
    rows, cols = size(df)
    plots = []
    for row = 1:rows, col = 1:cols
        push!(
            plots,
            scatter(
                df[row],
                df[col],
                xtickfont = font(4),
                ytickfont = font(4),
                legend = false,
            ),
        )
    end
    plot(plots..., layout = (rows, cols))
end

pairplot(df)

which gives

1 Like