Commit 8840d6e
committed
Move axisartist towards using standard Transforms.
axisartist can generate "slanted" or "curved" axes defined using either
a custom Transform, or a custom pair of callables (forward, backward)
which define the Transform. Instead of repeatedly testing the two cases
in `transform_xy` and `inv_transform_xy`, just wrap the
pair-of-callables into a custom Transform subclass (which should
probably not be moved to the main library, as it uses the transposed
convention compared to the usual one), and expose it through a getter.
This allows later combining this transform using "standard" transform
addition (and get benefits such as single multiplication of matrices
in affine transforms, exact cancellation of inverses, or (later) more
accurate transforming of arcs in polar transforms), instead of having to
manually call successive transforms. See e.g. the two changes in the
local transform_xy definitions.1 parent a9c5224 commit 8840d6e
File tree
3 files changed
+49
-25
lines changed- lib/mpl_toolkits/axisartist
3 files changed
+49
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 77 | + | |
| 78 | + | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
95 | 123 | | |
96 | 124 | | |
97 | 125 | | |
| |||
123 | 151 | | |
124 | 152 | | |
125 | 153 | | |
126 | | - | |
| 154 | + | |
127 | 155 | | |
128 | 156 | | |
129 | 157 | | |
| |||
214 | 242 | | |
215 | 243 | | |
216 | 244 | | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
222 | 258 | | |
223 | 259 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
| 260 | + | |
230 | 261 | | |
231 | 262 | | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
| 263 | + | |
| 264 | + | |
238 | 265 | | |
239 | 266 | | |
240 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 205 | + | |
| 206 | + | |
209 | 207 | | |
210 | 208 | | |
211 | 209 | | |
| |||
0 commit comments