diff --git a/code/palettes.jl b/code/palettes.jl new file mode 100644 index 0000000..9320c2a --- /dev/null +++ b/code/palettes.jl @@ -0,0 +1,25 @@ +iridescent = [ + colorant"#FEFBE9", + colorant"#FCF7D5", + colorant"#F5F3C1", + colorant"#EAF0B5", + colorant"#DDECBF", + colorant"#D0E7CA", + colorant"#C2E3D2", + colorant"#B5DDD8", + colorant"#A8D8DC", + colorant"#9BD2E1", + colorant"#8DCBE4", + colorant"#81C4E7", + colorant"#7BBCE7", + colorant"#7EB2E4", + colorant"#88A5DD", + colorant"#9398D2", + colorant"#9B8AC4", + colorant"#9D7DB2", + colorant"#9A709E", + colorant"#906388", + colorant"#805770", + colorant"#684957", + colorant"#46353A" +] \ No newline at end of file diff --git a/slides.qmd b/slides.qmd index 627880c..8575abc 100644 --- a/slides.qmd +++ b/slides.qmd @@ -68,6 +68,7 @@ include(joinpath("code", "crossvalidate.jl")); # Cross-validation include(joinpath("code", "confusion.jl")); # Confusion matrix utilities include(joinpath("code", "variableselection.jl")); # Variable selection include(joinpath("code", "shapley.jl")); # Shapley values +include(joinpath("code", "palettes.jl")); # Color palettes ``` ## To train a model, we need... @@ -600,7 +601,7 @@ end #| output: true fig = Figure(; resolution=(900, 500)) ax = Axis(fig[1,1]; xlabel="Longitude", ylabel="Latitude", aspect=DataAspect()) -hm = heatmap!(ax, prediction, colormap=Reverse(:linear_gow_65_90_c35_n256), colorrange=(0., 1.)) +hm = heatmap!(ax, prediction, colormap=cgrad(iridescent), colorrange=(0., 1.)) heatmap!(ax, presence_layer; colormap=[:black,:black]) Colorbar(fig[1,2], hm; tellheight=false) current_figure() @@ -613,7 +614,7 @@ current_figure() #| output: true fig = Figure(; resolution=(900, 500)) ax = Axis(fig[1,1]; xlabel="Longitude", ylabel="Latitude", aspect=DataAspect()) -hm = heatmap!(ax, variability, colormap=Reverse(:linear_gow_65_90_c35_n256), colorrange=extrema(variability)) +hm = heatmap!(ax, variability, colormap=cgrad(iridescent), colorrange=extrema(variability)) heatmap!(ax, presence_layer; colormap=[:black,:black]) Colorbar(fig[1,2], hm; tellheight=false) current_figure()