JuliaEarth / GeoStats.jl

An extensible framework for geospatial data science and geostatistical modeling fully written in Julia
https://juliaearth.github.io/GeoStatsDocs/stable/
MIT License
506 stars 61 forks source link

Review colorbar creation with `viz` and `viewer` #413

Closed juliohm closed 6 months ago

juliohm commented 6 months ago

We need to review our treatment of colors in viz and viewer. In particular, we need to look into two areas:

  1. Makie now supports a Makie.Categorical(colorscheme) to convert a continuous colorscheme into a categorical colorscheme with good tick defaults. We need to use that instead of placing our ticks manually.
  2. When using fig, ax, plt = viz(...) it is not always possible to create a colorbar automatically from the plt object, because of missing attributes such as colormap, colorrange, etc. This automatic creation of colorbar is only possible in some Makie builtin functions because they store these attributes.
juliohm commented 6 months ago

Fixed on master.