diff --git a/.vscode/settings.json b/.vscode/settings.json index c6695d2..2c63c08 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,2 @@ { - "julia.environmentPath": "c:\\Coding\\splomplots.jl" } diff --git a/src/SplomPlots.jl b/src/SplomPlots.jl index 721520d..118a7b6 100644 --- a/src/SplomPlots.jl +++ b/src/SplomPlots.jl @@ -17,18 +17,21 @@ function splom(df::DataFrame) end cols = collect(keys(columns)) - col_pairs = zip(cols[1:(end - 1)], cols[2:end]) + col_pairs = [(x, y) for x in cols, y in cols] - # plot(layout=length(cols)^2) scatter_plots = repeat( [scatter([1], [1])], length(col_pairs) ) for (i, (x, y)) in enumerate(col_pairs) - println((x, y)) - scatter_plots[i] = scatter(df[!, x], df[!, y]) + if x == y + scatter_plots[i] = plot() + else + scatter_plots[i] = scatter(df[!, x], df[!, y]) + end end - return plot(scatter_plots...) + + return plot(scatter_plots...; label="") end df = dataset("datasets", "iris")