Commit 3da28af
committed
BUG: Preserve autolim=False semantics for Collection relim support
_set_in_autoscale(True) was set unconditionally in add_collection(),
outside the 'if autolim:' block. This meant that any collection added
with autolim=False would still be picked up by relim() later.
Fix: move _set_in_autoscale(True) inside the 'if autolim:' block so
that relim() only considers collections that explicitly opted in.
Add two regression tests:
- test_relim_collection_autolim_false: verifies that a collection added
with autolim=False does not affect limits after relim().
- test_relim_collection_log_scale: verifies that relim() + autoscale_view()
works correctly for a Collection on log-scaled axes (exercises the
minpos path).
Closes #308591 parent 1d8b229 commit 3da28af
2 files changed
Lines changed: 38 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2432 | 2432 | | |
2433 | 2433 | | |
2434 | 2434 | | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
2435 | 2439 | | |
2436 | 2440 | | |
2437 | | - | |
2438 | 2441 | | |
2439 | 2442 | | |
2440 | 2443 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6542 | 6542 | | |
6543 | 6543 | | |
6544 | 6544 | | |
| 6545 | + | |
| 6546 | + | |
| 6547 | + | |
| 6548 | + | |
| 6549 | + | |
| 6550 | + | |
| 6551 | + | |
| 6552 | + | |
| 6553 | + | |
| 6554 | + | |
| 6555 | + | |
| 6556 | + | |
| 6557 | + | |
| 6558 | + | |
| 6559 | + | |
| 6560 | + | |
| 6561 | + | |
| 6562 | + | |
| 6563 | + | |
| 6564 | + | |
| 6565 | + | |
| 6566 | + | |
| 6567 | + | |
| 6568 | + | |
| 6569 | + | |
| 6570 | + | |
| 6571 | + | |
| 6572 | + | |
| 6573 | + | |
| 6574 | + | |
| 6575 | + | |
| 6576 | + | |
| 6577 | + | |
| 6578 | + | |
6545 | 6579 | | |
6546 | 6580 | | |
6547 | 6581 | | |
| |||
0 commit comments