Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Commit71cf4b5
committed
Use Path.arc() to interpolate polar arcs.
Currently, in polar plots, arcs are rendered by linearly interpolatingin (theta, r) space before conversion to (x, y) space (if their_interpolation_steps attribute is >1 -- this attribute is described inthe docs as "an implementation detail not intended for public use").When _interpolation_steps == 1, this PR doesn't change anything -- thereis an example (specialty_plots/radar_chart) that explicitly relies onbeing able to set _interpolation_steps to 1 and get a "polygonal" polaraxes rather than a circular one.When _interpolation_steps > 1, however, this PR looks for paths segmentsthat are either at a constant theta or a constant r. It transformsconstant-theta segments to a single segment (because interpolationdoesn't help there) and transforms constant-r segments (circular arcs)to a Bezier approximation of a circle which is already implemented inPath.arc()).This greatly decreases the number of control points for such plots invector outputs (which are thus smaller), and also improves rasterizationby mplcairo (cairo appears to be not so good at filling areas with a lotof close vertices).The many changes in baseline images are due to, well, the change ofapproximation for drawing circles.1 parent0851204 commit71cf4b5
File tree
40 files changed
+3395
-11093
lines changed- lib/matplotlib
- projections
- tests/baseline_images/test_axes
40 files changed
+3395
-11093
lines changedLines changed: 52 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
60 |
| - | |
61 |
| - | |
62 |
| - | |
63 |
| - | |
64 |
| - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
65 | 111 |
| |
66 | 112 |
| |
67 | 113 |
| |
|
Binary file not shown.
Loading
Lines changed: 704 additions & 1199 deletions
Loading
Binary file not shown.
0 commit comments
Comments
(0)