-
-
Notifications
You must be signed in to change notification settings - Fork 321
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
Feature request: nan_color kwarg for meshscatter #720
Comments
@briochemc I am wondering if this PR could help in your case. (But note the PR only modifies the behavior of heatmap when using matrices as X and Y). |
I actually don't need this anymore since Makie's |
Maybe I misunderstand the present issue, but if you want to use grey NaNs you could do this: (with PR JuliaPlots/CairoMakie.jl#177) using CairoMakie
x = sqrt.(0:10:100); y = sqrt.(0:10:100);
X = [x_ for x_ in x, y_ in y]
Y = [y_ for x_ in x, y_ in y]
A = randn(10,10);
A[3,5] = NaN;
fig = heatmap(X,Y,A, nan_color = RGBf0(0.8,0.8,0.8));
save("test.png",fig) |
Thanks @SimonDanisch , I did not know that 😄 Sorry for the noise. |
btw surface also already supports matrices as arguments ;) Just needs shading false and z set to all 0, to generate that kind of heatmap..Although it will be interpolated ;) |
Indeed |
A non-interpolated surface would basically be a generated mesh, with unique vertices for each grid cell. This is the only way to get per-face color into OpenGL, unfortunately. We could have a short path for CairoMakie though! |
|
It would be great to be able to use the
nan_color
kwarg as implemented forheatmap
by @jkrumbiegel in response to #666.This would allow it to be combined with a
meshscatter
recipe for irregularly spaced grids (inspired from @ffreyer in #675 (comment)), something like that:and plot nice stuff like this:
but with gray
NaN
s! 😄The text was updated successfully, but these errors were encountered: