-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Draw markers around center of pixels #5603
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
Conversation
Would probably be good to have some tests specifically for this. Different markers, different sizes, different locations and at different resolutions. Does shifting it half a pixel only impact the visual result if rounding would have been an issue? I also wonder if a similar approach might solve the contourf problem? |
Once the tests are lowered to zero tolerance in #5307, the existing tests should do that and detect changes of this magnitude. And there are already tests that test all of the different markers (
I don't think so. I've already experimented with snapping to solve that problem some time ago, and it doesn't help. |
Does this address #3400 ? |
And when we lower the tolerance to zero, and images are remade en masse, are we going to be able to verify every single marker is drawn correctly? Also, we don't have all that many tests that use different resolutions? I would love to see test images made at fairly low resolutions that draws lines like you have above and plots markers at their intersections. Having it at a low resolution would make it visually obvious that something is wrong. |
Yes. That was why I built the comparison tool in #5521, to make that kind of thing much easier.
That's true.
That's a good point. |
I think not, unfortunately -- addressing that requires the line and the marker line to know about each other and snap in sync. We don't really have that kind of global knowledge. But #3400 only really becomes a problem if the user customizes the line width or marker edge width to be a mismatch of even/odd sizes. |
Was |
Yep. For reasons that are rather obscure, stackplots end up going through the |
So, the stackplots are polygons, right? Would it make sense to treat I am being overly hopeful, but the stackplots do look better now, so I just
|
FIX: Draw markers around center of pixels
FIX: Draw markers around center of pixels
backported to 1.5.x as 34c7dad |
When the snapping of circle markers was disabled in 37927b2, in order to make them look more round, it also made them half a pixel off of center (since the snapping was no longer happening). This shifts non-snapped markers by half a pixel to keep (0, 0) running down the middle of the pixel.
BEFORE THIS PR:
AFTER THIS PR:
As a procedural point, we should try to get this in before #5307, as it will change many of the baseline images (for the better, we hope).