Added Project and Report
This commit is contained in:
28
Lessons/11-03/showyalefaces.jl
Normal file
28
Lessons/11-03/showyalefaces.jl
Normal file
@ -0,0 +1,28 @@
|
||||
include("./readyalefaces_to_tensor.jl")
|
||||
|
||||
using Plots, Plots.PlotMeasures, ColorSchemes
|
||||
|
||||
(X, _) = readyalefaces_to_tensor()
|
||||
# X = X[:,:,1:4,[12,9,6,1]]; # filters out only some faces
|
||||
(w, h, expr, ind) = size(X)
|
||||
|
||||
function showyalefaces()::Plots.Plot
|
||||
plts = Array{Plots.Plot}(undef, expr, ind)
|
||||
|
||||
for i ∈ 1:expr
|
||||
for j ∈ 1:ind
|
||||
plts[i, j] = heatmap(X[:, :, i, j],
|
||||
leg = false,
|
||||
ticks = nothing,
|
||||
yflip=true,
|
||||
c = cgrad(:dense, rev = true)
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
l = @layout [
|
||||
grid(ind, expr)
|
||||
]
|
||||
|
||||
plot(plts..., layout = l, margin = -2mm)
|
||||
end
|
||||
Reference in New Issue
Block a user