Improved qhull triangulations with large x,y offset#8873
Improved qhull triangulations with large x,y offset#8873QuLogic merged 4 commits intomatplotlib:masterfrom
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.
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.
|
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
offsetand1+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=1e10in 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.