How to provide a function for easy plotting w/o bloating the package dependencies and allowing to modify the plot later on?
function plot_map(geo_cube::GeoCube)
# Can not use Makie plot recipies, because we need to specify the axis for GeoMakie
# see https://discourse.julialang.org/t/accessing-axis-in-makie-plot-recipes/66006
fig = Figure()
ax = GeoAxis(fig[1, 1]; dest="+proj=wintri", coastlines=true)
plt = surface!(ax, geo_cube.longitudes, geo_cube.latitudes, geo_cube.data.data; colormap=:viridis, shading=false)
cb1 = Colorbar(fig[1, 2], plt; label="Value", height=Relative(0.5))
return fig
end
function plot_map(cell_cube::CellCube)
# raster cellcube, because geo coordinates needed for plotting
geo_cube = GeoCube(cell_cube)
plot_map(geo_cube)
end
How to provide a function for easy plotting w/o bloating the package dependencies and allowing to modify the plot later on?