CliMA / CliMA/ClimaAnalysis.jl

Fixing `nan_color` for CairoMakie when plotting heatmaps

Open
#172 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
12
Forks
5
Avg merge
6d 17h
Merged PRs (30d)
3

Description

Since you can provide your own masking function that NaN out data, you may want to change the color of the NaNs to something else. With the CairoMakie backend, you can't easily change it by using the `nan_color` keyword. See [https://github.com/MakieOrg/Makie.jl/issues/4524](https://github.com/MakieOrg/Makie.jl/issues/4524).

To fix this, we can do what is suggested in that issue and plot it like this: `surface!(ax, lons, lats, zeros(size(field)); color = field, shading = NoShading, nan_color = :red)`. Here, we are using the `color` keyword.

Contributor guide

No contributing guide indexed for this repository

Research direction

No file or test is named. Start by locating the heatmap or surface plotting entry point and its CairoMakie-specific path, then review the linked issue for context. Done means heatmaps rendered with CairoMakie honor the nan_color keyword when color is supplied as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.