Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing nan_color for CairoMakie when plotting heatmaps #172

Open
ph-kev opened this issue Nov 19, 2024 · 0 comments
Open

Fixing nan_color for CairoMakie when plotting heatmaps #172

ph-kev opened this issue Nov 19, 2024 · 0 comments

Comments

@ph-kev
Copy link
Member

ph-kev commented 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 the color keyword.

@ph-kev ph-kev changed the title Fixing nan_color for CairoMakie Fixing nan_color for CairoMakie when plotting heatmaps Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant