Hi all
I am trying to make a pairplot similar to what you get with the Seaborn library but with Makie. I am using MakieLayouts and StatsMakie. I am using the classic Iris data to test it before using it elsewhere. The problem is the data looks all stretched. I have tried using the options mentioned in the MakieLayout docs here but with no success. Would someone maybe take a look and see.
col_names = [:sepalLength, :sepalWidth, :petalLength, :petalWidth, :class]
df = readdlm("iris.csv", ',')|> DataFrame
rename!(df, col_names)
df[!, 1:4] = Float32.(df[!,1:4])
df[!, 5] = String.(df[!, 5])
function pairplot(df)
dim = size(df, 2)-1
scene, layout = layoutscene(30, resolution = (900, 900))
axs = layout[1:dim, 1:dim] = [LAxis(scene) for i in 1:dim^2]
x = 0
for i in 1:dim, j in 1:dim
if i == j
x+=1
plt = plot!(axs[x],Position.stack, histogram, Data(df), Group(:class), df[:, i])
else
x+=1
plt = Makie.scatter!(axs[x], Data(df), Group(:class), df[:,j], df[:,i])
end
end
scene
end
testPlot = pairplot(df)
Output is below