Commit 54e673c
committed
BUG: Fix IndexLocator.tick_values returning values greater than vmax
Fix IndexLocator.tick_values() to not return tick values that exceed
vmax. Previously, when using IndexLocator with certain offset values,
the generated ticks could exceed the specified vmax, causing issues
like colorbar.get_ticks() returning incorrect values for discrete
colormaps with NoNorm normalization.
The fix adds a filter to remove any tick values greater than vmax
after generating the initial tick positions.
Fixes #310861 parent 2b8103b commit 54e673c
2 files changed
Lines changed: 27 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
607 | 630 | | |
608 | 631 | | |
609 | 632 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1767 | 1767 | | |
1768 | 1768 | | |
1769 | 1769 | | |
1770 | | - | |
1771 | | - | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
1772 | 1774 | | |
1773 | 1775 | | |
1774 | 1776 | | |
| |||
0 commit comments