... plot layers using Makie? β
The layers are integrated with the Makie plotting package.
julia
using SpeciesDistributionToolkit
using CairoMakie
Let's grab two layers:
julia
spatial_extent = (; left = -4.87, right=9.63, bottom=41.31, top=51.14)
data_prov = RasterData(CHELSA1, BioClim)
temperature = 0.1SDMLayer(data_prov; layer="BIO1", spatial_extent...)
precipitation = SDMLayer(data_prov; layer="BIO8", spatial_extent...)
πΊοΈ A 1180 Γ 1741 layer with 1497697 Int16 cells
Projection: +proj=longlat +datum=WGS84 +no_defs
Additional arguments
All of these plots can be further customized by passing the usual arguments to Makie plots.
Recipes for a single layer β
Heatmap β
julia
heatmap(temperature; axis=(; aspect=DataAspect()))
Contour β
julia
contour(temperature; axis=(; aspect=DataAspect()))
Filled contour β
julia
contourf(temperature; axis=(; aspect=DataAspect()))
Histogram β
julia
hist(temperature)
Density β
julia
density(temperature)
Step histogram β
julia
stephist(temperature)
ECDF plot β
julia
ecdfplot(temperature)
Recipes for two layers β
Scatterplot β
julia
scatter(precipitation, temperature)
Density β
julia
hexbin(precipitation, temperature)
Recipes that you probably should not use β
julia
surface(0.0005precipitation)