-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Improved qhull triangulations with large x,y offset #8873
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
Improved qhull triangulations with large x,y offset #8873
Conversation
Can you add an image comparison test to demonstrate the plotting from #8682? |
Tests are complaining about |
I am happy with checking that the triangulation is of a consistent size. We might need to put a small threshold on that test now that we are pushing the precision of the system? I assume @ianthomas23 you are not on a mac? |
@tacaswell You are correct, I use Linux. Another option is to simplify the test script/image. At the moment it is a direct copy of one of the examples and has lots of very closely-spaced contours, some of them overlapping. |
Either option is fine. |
@@ -0,0 +1,6 @@ | |||
Improved Delaunay triangulations with large offsets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a mention of the Matplotlib methods that are affected by this change? Users might not be aware of what a Delaunay triangulation is or what Matplotlib is doing under the hood, but will be able to identify with a specific Matplotlib method that they use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping @ianthomas23.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As always, thank you @ianthomas23 ! |
Fixes issue #8682.
Rather than changing the qhull options that we use, I am explicitly subtracting the means from the x, y coordinates before calling qhull to calculate the Delaunay triangulation. If you have coordinate positions
offset
and1+offset
, previously the triangulation would fail (merging 'nearby' points) foroffset=1e5
. Now it is OK for at leastoffset=1e15
, but I've set the limit in the test tooffset=1e10
in case different architectures/OSes give different numerical errors.There are some minor changes to two of the test images, so I have added a API change note that other triangulations may be slightly modified by this change.