Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Commit59a6a2f
committed
Fix incorrect transform in apply_aspect.
x_trf goes from rawdata-space to scaled-space, so it's what should getapplied to datalims, not x_trf.inverted(). So``` x0, x1 = map(x_trf.inverted().transform, dL.intervalx) y0, y1 = map(y_trf.inverted().transform, dL.intervaly)```from87c742b should have been``` x0, x1 = map(x_trf.transform, dL.intervalx) y0, y1 = map(y_trf.transform, dL.intervaly)```However, fixing that triggered a failure fortest_aspect_nonlinear_adjustable_datalimwhich had been added in that commit, and fixing that unraveled moreissues.The basic question is, when aspect is set and adjustable="datalim",should we change the x limits or the y limits to get the correct aspect?The old code used some complex conditions, which I actually haven'tmanaged to fully understand, to either expand or shrink one of theaxises. Instead, just choose to always expand (rather than shrink) oneof the axises, which will avoid sending artists out-of-bounds. (Thesole exception is in care of shared axes, which we do not touch asexplained in the comment.)This patch caused a change in the autolimiting oftest_axes.py::test_pie_frame_grid which was buggy anyways, I forced theold behavior by setting x/ylims manually (after checking that thedefault is to expand the limits).1 parent667a100 commit59a6a2f
2 files changed
+35
-41
lines changedLines changed: 28 additions & 41 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1501 | 1501 |
| |
1502 | 1502 |
| |
1503 | 1503 |
| |
1504 |
| - | |
1505 |
| - | |
1506 |
| - | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
1507 | 1507 |
| |
1508 | 1508 |
| |
1509 |
| - | |
1510 |
| - | |
1511 |
| - | |
1512 |
| - | |
1513 |
| - | |
1514 |
| - | |
1515 |
| - | |
1516 |
| - | |
1517 |
| - | |
1518 |
| - | |
1519 |
| - | |
1520 |
| - | |
1521 |
| - | |
1522 |
| - | |
1523 |
| - | |
1524 |
| - | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
1525 | 1516 |
| |
1526 | 1517 |
| |
1527 |
| - | |
1528 | 1518 |
| |
1529 | 1519 |
| |
1530 | 1520 |
| |
1531 |
| - | |
1532 |
| - | |
1533 |
| - | |
1534 |
| - | |
1535 |
| - | |
1536 |
| - | |
1537 |
| - | |
1538 |
| - | |
1539 |
| - | |
1540 |
| - | |
1541 |
| - | |
1542 |
| - | |
1543 |
| - | |
1544 |
| - | |
1545 |
| - | |
1546 |
| - | |
1547 |
| - | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
1548 | 1535 |
| |
1549 |
| - | |
1550 |
| - | |
1551 |
| - | |
1552 |
| - | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
1553 | 1540 |
| |
1554 | 1541 |
| |
1555 | 1542 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4928 | 4928 |
| |
4929 | 4929 |
| |
4930 | 4930 |
| |
| 4931 | + | |
| 4932 | + | |
| 4933 | + | |
| 4934 | + | |
| 4935 | + | |
| 4936 | + | |
| 4937 | + | |
4931 | 4938 |
| |
4932 | 4939 |
| |
4933 | 4940 |
| |
|
0 commit comments
Comments
(0)