Commit d276da0
committed
Fix #1530
It now takes into account the side label visibility in the rotation of labels.
Add better and more control to gridliner labels drawing
* draw_labels accepts more than a boolean.
* label positioning is better estimates thanks to side spines
Clean gridliner
Improve the rotation and visibility of gridline labels
- the location of labels takes spines into account
- lines and labels are redrawn when zooming
- the rotation of labels is both more tunable and strict
- added the inside parameter for drawing labels inside the the boundary
Fix stickler
Fix padding
Fix the rotation of labels
Possible values: True, False, None
None: it depends on the projection.
True: rotate along gridlines.
False: horizontal.
Another type of location for labels in addition
to left, right, top and bottom: geo.
By the way, add more control to the gridliner init by adding
the xpadding and ypadding keywords.
Add support for float values of rotate_labels
Also expose xlabel_style, ylabel_style and labels_bbox_style as
keyword argument to gridlines() and Gridliner().
Note that labels_bbox_style no longer override the bbox value
if x/ylabel_style.
Fix alignments
Fix labels in classic mode
Fix gridliner labels
Add Label class
Fix _get_loc_from_spine_intersection
Fix case where gridline stop before map boundary
Update of the baseline images
Fix linter
Fix gridliner
Fix gridliner compat with old mpl
Fix artist.update call
Fix labels drawing
Add more help for draw_labels
fix linting
Add myself to contributors1 parent 32b203b commit d276da0
6 files changed
Lines changed: 741 additions & 259 deletions
File tree
- docs/source
- lib/cartopy
- mpl
- tests/mpl
- baseline_images/mpl/test_gridliner
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1374 | 1374 | | |
1375 | 1375 | | |
1376 | 1376 | | |
1377 | | - | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
1378 | 1380 | | |
1379 | 1381 | | |
1380 | 1382 | | |
| |||
1386 | 1388 | | |
1387 | 1389 | | |
1388 | 1390 | | |
1389 | | - | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
1390 | 1410 | | |
1391 | 1411 | | |
1392 | 1412 | | |
| |||
1433 | 1453 | | |
1434 | 1454 | | |
1435 | 1455 | | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
1436 | 1486 | | |
1437 | 1487 | | |
1438 | 1488 | | |
| |||
1461 | 1511 | | |
1462 | 1512 | | |
1463 | 1513 | | |
1464 | | - | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
1465 | 1520 | | |
1466 | 1521 | | |
1467 | 1522 | | |
| |||
0 commit comments