Skip to content

Fixing nan_color for CairoMakie when plotting heatmaps #172

Open
@ph-kev

Description

@ph-kev

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 MakieOrg/Makie.jl#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions