From 4853ad51e4b69a2f0e24c18224541e0dbde9ca4a Mon Sep 17 00:00:00 2001 From: Anson Date: Wed, 9 Mar 2022 18:31:54 -0700 Subject: [PATCH] added axis labels --- src/SplomPlots.jl | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/SplomPlots.jl b/src/SplomPlots.jl index 118a7b6..adebfc0 100644 --- a/src/SplomPlots.jl +++ b/src/SplomPlots.jl @@ -18,16 +18,27 @@ function splom(df::DataFrame) cols = collect(keys(columns)) col_pairs = [(x, y) for x in cols, y in cols] - + col_len = length(cols) scatter_plots = repeat( [scatter([1], [1])], length(col_pairs) ) for (i, (x, y)) in enumerate(col_pairs) + scatter_plots[i] = plot() if x == y - scatter_plots[i] = plot() + plot!(; + xaxis=nothing, yaxis=nothing, showaxis=false + ) else - scatter_plots[i] = scatter(df[!, x], df[!, y]) + scatter!(df[!, x], df[!, y]) + end + + if i % col_len == 1 + ylabel!(y) + end + + if length(col_pairs) - i < col_len + xlabel!(x) end end