Commit 2cc8e14
committed
Only allow set_adjustable("datalim") for axes with standard data ratios.
If an Axes subclass overrides get_data_ratio to anything else than
"ratio of data limits after application of scales" (e.g. Polar always
returns 1), then the data limits manipulation in apply_aspect won't
achieve the proper data ratio anyways, so disable setting adjustable to
"datalim" in that case.
For example, calling `axis("equal")` on polar axes (which also sets
adjustable to "datalim") will now error out instead of resulting in a
nonsensical plot.1 parent 2d56d42 commit 2cc8e14
2 files changed
Lines changed: 18 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1317 | 1317 | | |
1318 | 1318 | | |
1319 | 1319 | | |
1320 | | - | |
1321 | | - | |
| 1320 | + | |
| 1321 | + | |
1322 | 1322 | | |
1323 | | - | |
1324 | | - | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
1325 | 1333 | | |
1326 | 1334 | | |
1327 | 1335 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4724 | 4724 | | |
4725 | 4725 | | |
4726 | 4726 | | |
| 4727 | + | |
| 4728 | + | |
| 4729 | + | |
| 4730 | + | |
| 4731 | + | |
| 4732 | + | |
4727 | 4733 | | |
4728 | 4734 | | |
4729 | 4735 | | |
| |||
0 commit comments