Nice! thx for the tip.
Below the final function to plot a corr heatmap:
function corrheatmap(df::AbstractDataFrame ,colnames::Vector{Symbol})
a = DataFrame(cor(Matrix(df[!,colnames])), colnames)
g = []
b = 1
for e in 1:length(colnames)
for i in eachrow(a[!,colnames])
if b == 1 && e != 1
c = (e, e, (string(round(i[1],digits = 3)), 8, :red, :center))
elseif b == e
c = (e, 1, (string(round(i[1],digits = 3)), 8, :red, :center))
else
c = (e, b, (string(round(i[e],digits = 3)), 8, :red, :center))
end
if b < length(colnames)
b += 1
else
b = 1
end
push!(g,c)
end
end
k = Vector{Tuple{Int64, Int64, Tuple{String, Int64, Symbol, Symbol}}}(g)
@df a Plots.heatmap(cols(colnames);
xticks=(1:length(colnames), colnames),
yticks=(1:length(colnames), colnames),
xrotation = 90)
annotate!(k)
end
corrheatmap(df,[:Age,:Balance,:EstimatedSalary])