-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
fix contour boundingbox with NaN
s
#3210
Conversation
8b050bf
to
1279ed6
Compare
Hi @t-bltg , |
Which backend was this? |
@jkrumbiegel CairoMakie |
Let me have a look this morning. |
Could be a bug in CairoMakie, too, because there is one little line segment and afterwards nothing, also the axis lines are missing. That usually happens when Cairo silently corrupts the surface state, which can happen with NaNs sometimes. |
GLMakie works fine now (except missing 2 labels). |
I'm marking as ready for review because I have no ideas left currently. |
Dear @t-bltg , |
I would want
EDIT2: fixed. |
I don't think contour algorithms work with values you want to "ignore", NaNs always cause these gaps because in their surroundings the interpolation is not defined. However, if you want that behavior you can linearly interpolate the points yourself, as linear interpolation is what the contour algorithm does anyway. |
Aside from the NaN-interpolation question discussed above, is this now in mergeable state? With NaN causing the appropriate gaps? |
Current state, output from the code snippet in #3210 (comment). |
Ok so CairoMakie is still buggy |
Is this inconsistency between |
This must be a NaN-handling bug in CairoMakie. It may not actually draw NaNs, they have to be skipped (but one has to be careful to create the right paths in the process). And here it seems it's drawn (or something else that doesn't work) because the axis lines are missing, so Cairo broke in the process of drawing this. |
Oh right I didn't notice the axis lines missing. |
Yeah probably in the code I refactored a while ago, it's a bit more complex because it tries to draw lines together as long as they have the same color and width. https://github.com/MakieOrg/Makie.jl/blob/master/CairoMakie/src/primitives.jl#L207-L288 |
@jkrumbiegel, this is the new output, the bug was lying in the routine drawing glyphs. The output is now consistent across |
Could you remove all the non functionality related formatting changes? Makes it harder to see what's up. Also the empty ifs with comments can be left as they are, I know they technically don't do anything but they helped me understand what the code was doing. |
Done.
I agree for the review, although these changes were make to simplify and make the current code consistent.
Done. |
NaN
s
Thank you! Looks good to me |
Description
Fixes discord issue (fix #3211):
Fix a
CairoMakie
bug when glyphs positions contained aNaN
, corrupting the Cairo drawing state / context.Type of change
Delete options that do not apply:
Checklist