Commit 9783e24
committed
dates.YearLocator doesn't handle inverted axes
All other Locators are derived from RRuleLocator, which has the following check inside its `__call__` routine:
try:
dmin, dmax = self.viewlim_to_dt()
except ValueError:
return []
if dmin > dmax:
dmax, dmin = dmin, dmax
YearLocator just gets values for `dmin` and `dmax` in the same manner as above and goes on using them without checking for ordering and swapping if necessary. This leads to only one tick on axes using YearLocator.1 parent 42f09b6 commit 9783e24
1 file changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
698 | 698 | | |
699 | 699 | | |
700 | 700 | | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
701 | 704 | | |
702 | 705 | | |
703 | 706 | | |
704 | 707 | | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
705 | 711 | | |
706 | 712 | | |
707 | 713 | | |
| |||
748 | 754 | | |
749 | 755 | | |
750 | 756 | | |
751 | | - | |
752 | | - | |
753 | 757 | | |
754 | 758 | | |
755 | 759 | | |
| |||
820 | 824 | | |
821 | 825 | | |
822 | 826 | | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | 827 | | |
827 | 828 | | |
828 | 829 | | |
| |||
0 commit comments