Skip to content

Commit

Permalink
start moving palettes (see #7)
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoisot committed Oct 12, 2023
1 parent 3b213da commit a26e156
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
25 changes: 25 additions & 0 deletions code/palettes.jl
Original file line number Diff line number Diff line change
@@ -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"
]
5 changes: 3 additions & 2 deletions slides.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand Down

0 comments on commit a26e156

Please sign in to comment.