Hi All,
Still very new to Julia and Pluto. I’ve encountered a strange warning in a cell regarding plotting calls that involve seriestype density. The warning is:
seriestype density has been moved to StatsPlots. To use:
Pkg.add("StatsPlots"); using StatsPlots
However, in the first cell of the notebook, I do call using StatsPlots and in the relevant code I am making specific calles to StatsPlots.density.
The whole notebook can be found at https://github.com/wccarleton/neanderthalsinarabia/tree/master/Src/Julia
And the cell issuing the warning contains the following (still messy work in progress):
begin
cols = ["PC1", "PC2", "PC3"]
plots = []
l = fill((label = :º, blank = false),(3,3))
sho = true
for j in 1:3, k in 1:3
if j == 1
sho = ["neanderthal" "sapiens"]
else
sho = nothing
end
if isequal(j,k)
#l[j,k] = (label = :_, blank = true)
p = StatsPlots.density(levallois_proj_df[:,cols[j]],
levallois_proj_df[:,cols[k]],
group = levallois_proj_df.Sp,
color = ColorSchemes.mk_15[[5 6]],
fill=(0, .25, ColorSchemes.mk_15[[5 6]]),
linewidth = 2,
legend = true,
lab = sho)
Plots.annotate!(p, [((0.9, 0.9), (cols[j], 10, :white, :center))])
push!(plots, p)
elseif j < k
#l[j,k] = (label = :_, blank = true)
species = ["sapiens","neanderthal"]
nspecies = length(species)
grads = []
for c in 5:6
r,g,b = (ColorSchemes.mk_15[c].r,
ColorSchemes.mk_15[c].g,
ColorSchemes.mk_15[c].b)
col1 = RGBA(r, g, b, 0)
col2 = RGBA(r, g, b, 1)
gradient = Plots.cgrad([col1, col2])
push!(grads, gradient)
end
df = levallois_proj_df[isequal.(levallois_proj_df.Sp, species[1]),:]
kxy = KernelDensity.kde((df[:,cols[j]], df[:,cols[k]]))
p = Plots.contour(kxy.x, kxy.y, kxy.density, fill = true, levels = 10, color=grads[1],legend=false)
#for j in 2:nspecies
df = levallois_proj_df[isequal.(levallois_proj_df.Sp, species[2]),:]
kxy = KernelDensity.kde((df[:,cols[j]], df[:,cols[k]]))
Plots.contour!(p, kxy.x, kxy.y, kxy.density, fill = true, levels = 10, color=grads[2],legend=false)
#end
push!(plots, p)
else
push!(plots, Plots.scatter(levallois_proj_df[:,cols[j]],
levallois_proj_df[:,cols[k]],
color=ColorSchemes.mk_15[[5 6]],
markersize=2,
group = levallois_proj_df.Sp,
markerstrokewidth = 0,
lab = nothing))
end
end
P = Plots.plot(plots..., layout = l)
end
Any ideas would be very welcome. The warning is issued once for each iteration of the loop (9 times, corresponding to 9 cells in a matrix of plots).