Repository navigation
Commit 53b41f8
committed
Snap markers to subpixels instead of whole ones
We cache the marker for performance, but this causes it to look very
pixel-grid aligned, especially if there are multiple in a regular
pattern, or they are animated.
Apply the same algorithm as mplcairo noted by @anntzer in matplotlib#7233,
specifically, render and cache the marker in *n_subdiv* levels in each
direction, and pick the closest one for each marker.
Fixes matplotlib#72331 parent 05dd034 commit 53b41f8
12 files changed
Lines changed: 107 additions & 61 deletions
File tree
- lib/matplotlib
- backends
- tests/baseline_images
- test_axes
- test_simplification
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | | - | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
95 | 102 | | |
96 | 103 | | |
97 | 104 | | |
| |||
0 commit comments