Commit 1f8f50e
committed
Deprecate toplevel mpl.text.get_rotation; normalize rotations early.
get_rotation had been made a toplevel function a long time ago to be
used in TextWithDash, which has now been removed, so there isn't much
justification to have it separate. Also, note that while the toplevel
get_rotation's implementation also supported string-form of floats (see
test_text.test_get_rotation_string), this was not consistent with the
docstring, and, more importantly, it was not possible to set a Text's
rotation to e.g. "15." because Text.set_rotation() would first reject
that anyways.
Also, we can directly normalize angles in Text.set_rotation, rather than
doing it again and again in Text.get_rotation. Again, this made the old
inconsistency (on supporting string-form floats) clearer.1 parent a093342 commit 1f8f50e
File tree
3 files changed
+22
-19
lines changed- doc/api/next_api_changes/deprecations
- lib/matplotlib
- tests
3 files changed
+22
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
349 | | - | |
350 | | - | |
| 348 | + | |
| 349 | + | |
351 | 350 | | |
352 | 351 | | |
353 | 352 | | |
354 | 353 | | |
355 | | - | |
| 354 | + | |
356 | 355 | | |
357 | 356 | | |
358 | 357 | | |
359 | 358 | | |
360 | | - | |
| 359 | + | |
361 | 360 | | |
362 | 361 | | |
363 | 362 | | |
364 | 363 | | |
365 | | - | |
| 364 | + | |
366 | 365 | | |
367 | 366 | | |
368 | 367 | | |
369 | | - | |
| 368 | + | |
370 | 369 | | |
371 | 370 | | |
372 | 371 | | |
373 | 372 | | |
374 | | - | |
| 373 | + | |
375 | 374 | | |
376 | 375 | | |
377 | 376 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
| 243 | + | |
| 244 | + | |
248 | 245 | | |
249 | | - | |
| 246 | + | |
250 | 247 | | |
251 | 248 | | |
252 | 249 | | |
| |||
1176 | 1173 | | |
1177 | 1174 | | |
1178 | 1175 | | |
1179 | | - | |
1180 | | - | |
1181 | | - | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
1182 | 1183 | | |
1183 | 1184 | | |
1184 | | - | |
1185 | 1185 | | |
1186 | 1186 | | |
1187 | 1187 | | |
| |||
0 commit comments