-
Notifications
You must be signed in to change notification settings - Fork 204
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
plotter: consider modifying Contour to produce reproducible plots #622
Comments
What would be really helpful for this would be a minimal contour plot that is not reproducible. The current failing case has very complex contours, making investigation very difficult. |
I have looked into what seems to be causing this and it is extremely subtle; the differences are only visible with very high gain on the pixel intensity for the image diff. When you do that, you can see that the difference appears at cross-over points. For example this image shows in blue the original golden output and overlayed with high gain is a yellow (white - blue) pixel. This example is obtained from the example contour plot with some mods to reduce complexity, it is complex enough to reliably fail, and not too complex to not understand.
|
My suspicion is that the path is circularly permuted between tests and that the start and end point of paths get rendered by the back end differently to intermediate steps in a path. |
The alternative, and now probably more likely is that the implementation of the algorithm for making contours is a little brittle to floating point artifacts. Fixing this would not be trivial; if it's true, the issue is that contour connection is resolved by map look-ups, so if two end points are not identical when they should be, no connection will be made. |
ok. I better understand the issue now, thanks. quite interesting detective work :) |
As you can see through the code there are trepidatious comments about these kinds of effects. It's not clear to me that there is intrinsically a better way of doing it (using some non-zero threshold and having a different kind of container - which we have now in spatial - just means that we open ourselves up for false positives instead of these potentially (yet to be proven) false negatives). |
as noted in #620, plots produced by
Contour
are not reproducible.they look visually the same but the vg operations underneath are different.
this leads to plots not being exactly the same at the binary level (except for
pdf
. probably a feature of the backend)the "naive" draw strategy does generate reproducible plots.
The text was updated successfully, but these errors were encountered: