You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
ph-kev
changed the title
Fixing nan_color for CairoMakie
Fixing nan_color for CairoMakie when plotting heatmaps
Nov 19, 2024
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 thecolor
keyword.The text was updated successfully, but these errors were encountered: