Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Commit39d6d98
committed
Inline and optimize ContourLabeler.get_label_coords.
`get_label_coords` is clearly an internal helper to `locate_label`; e.g.the `distances` parameter needs to be filled in with a very specificarray that's internally computed by `locate_label`. Inline it, whichalso makes clearer the possibility to save some further computation for`locate_label` to return a linearized index (the part that was commented"There must be a more efficient way..."; indeed converting the array toa list of tuples to get back the index seems pretty inefficient).Also better document the implementation of `get_label_coords` (I'm notactually changing any of the code logic).1 parentf50fe72 commit39d6d98
File tree
2 files changed
+27
-23
lines changed- doc/api/next_api_changes/deprecations
- lib/matplotlib
2 files changed
+27
-23
lines changedLines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + |
Lines changed: 24 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
217 | 217 |
| |
218 | 218 |
| |
219 | 219 |
| |
| 220 | + | |
220 | 221 |
| |
221 | 222 |
| |
222 | 223 |
| |
| |||
278 | 279 |
| |
279 | 280 |
| |
280 | 281 |
| |
281 |
| - | |
282 |
| - | |
283 |
| - | |
284 |
| - | |
285 |
| - | |
286 |
| - | |
287 |
| - | |
288 |
| - | |
289 |
| - | |
290 |
| - | |
291 |
| - | |
292 |
| - | |
293 |
| - | |
294 |
| - | |
295 |
| - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
296 | 290 |
| |
297 | 291 |
| |
298 | 292 |
| |
| |||
301 | 295 |
| |
302 | 296 |
| |
303 | 297 |
| |
304 |
| - | |
305 |
| - | |
306 |
| - | |
307 |
| - | |
308 |
| - | |
309 |
| - | |
310 |
| - | |
311 |
| - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
312 | 313 |
| |
313 | 314 |
| |
314 | 315 |
| |
|
0 commit comments
Comments
(0)