|
166 | 166 | date information. This is most useful when used with the `AutoDateLocator`. |
167 | 167 |
|
168 | 168 | * `DateFormatter`: use `~datetime.datetime.strftime` format strings. |
169 | | -
|
170 | | -* `IndexDateFormatter`: date plots with implicit *x* indexing. |
171 | 169 | """ |
172 | 170 |
|
173 | 171 | import datetime |
174 | 172 | import functools |
175 | 173 | import logging |
176 | 174 | import math |
177 | | -import re |
178 | 175 |
|
179 | 176 | from dateutil.rrule import (rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY, |
180 | 177 | MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY, |
|
189 | 186 |
|
190 | 187 | __all__ = ('datestr2num', 'date2num', 'num2date', 'num2timedelta', 'drange', |
191 | 188 | 'epoch2num', 'num2epoch', 'set_epoch', 'get_epoch', 'DateFormatter', |
192 | | - 'ConciseDateFormatter', 'IndexDateFormatter', 'AutoDateFormatter', |
| 189 | + 'ConciseDateFormatter', 'AutoDateFormatter', |
193 | 190 | 'DateLocator', 'RRuleLocator', 'AutoDateLocator', 'YearLocator', |
194 | 191 | 'MonthLocator', 'WeekdayLocator', |
195 | 192 | 'DayLocator', 'HourLocator', 'MinuteLocator', |
@@ -607,11 +604,6 @@ class DateFormatter(ticker.Formatter): |
607 | 604 | `~datetime.datetime.strftime` format string. |
608 | 605 | """ |
609 | 606 |
|
610 | | - @_api.deprecated("3.3") |
611 | | - @property |
612 | | - def illegal_s(self): |
613 | | - return re.compile(r"((^|[^%])(%%)*%s)") |
614 | | - |
615 | 607 | def __init__(self, fmt, tz=None, *, usetex=None): |
616 | 608 | """ |
617 | 609 | Parameters |
@@ -639,33 +631,6 @@ def set_tzinfo(self, tz): |
639 | 631 | self.tz = tz |
640 | 632 |
|
641 | 633 |
|
642 | | -@_api.deprecated("3.3") |
643 | | -class IndexDateFormatter(ticker.Formatter): |
644 | | - """Use with `.IndexLocator` to cycle format strings by index.""" |
645 | | - |
646 | | - def __init__(self, t, fmt, tz=None): |
647 | | - """ |
648 | | - Parameters |
649 | | - ---------- |
650 | | - t : list of float |
651 | | - A sequence of dates (floating point days). |
652 | | - fmt : str |
653 | | - A `~datetime.datetime.strftime` format string. |
654 | | - """ |
655 | | - if tz is None: |
656 | | - tz = _get_rc_timezone() |
657 | | - self.t = t |
658 | | - self.fmt = fmt |
659 | | - self.tz = tz |
660 | | - |
661 | | - def __call__(self, x, pos=0): |
662 | | - """Return the label for time *x* at position *pos*.""" |
663 | | - ind = int(round(x)) |
664 | | - if ind >= len(self.t) or ind <= 0: |
665 | | - return '' |
666 | | - return num2date(self.t[ind], self.tz).strftime(self.fmt) |
667 | | - |
668 | | - |
669 | 634 | class ConciseDateFormatter(ticker.Formatter): |
670 | 635 | """ |
671 | 636 | A `.Formatter` which attempts to figure out the best format to use for the |
|
0 commit comments