|
187 | 187 | from matplotlib import _api, cbook, ticker, units |
188 | 188 |
|
189 | 189 | __all__ = ('datestr2num', 'date2num', 'num2date', 'num2timedelta', 'drange', |
190 | | - 'epoch2num', 'num2epoch', 'set_epoch', 'get_epoch', 'DateFormatter', |
191 | | - 'ConciseDateFormatter', 'AutoDateFormatter', |
192 | | - 'DateLocator', 'RRuleLocator', 'AutoDateLocator', 'YearLocator', |
193 | | - 'MonthLocator', 'WeekdayLocator', |
| 190 | + 'set_epoch', 'get_epoch', 'DateFormatter', 'ConciseDateFormatter', |
| 191 | + 'AutoDateFormatter', 'DateLocator', 'RRuleLocator', |
| 192 | + 'AutoDateLocator', 'YearLocator', 'MonthLocator', 'WeekdayLocator', |
194 | 193 | 'DayLocator', 'HourLocator', 'MinuteLocator', |
195 | 194 | 'SecondLocator', 'MicrosecondLocator', |
196 | 195 | 'rrule', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU', |
@@ -1737,16 +1736,6 @@ def set_axis(self, axis): |
1737 | 1736 | self._wrapped_locator.set_axis(axis) |
1738 | 1737 | return super().set_axis(axis) |
1739 | 1738 |
|
1740 | | - @_api.deprecated("3.5", alternative="`.Axis.set_view_interval`") |
1741 | | - def set_view_interval(self, vmin, vmax): |
1742 | | - self._wrapped_locator.set_view_interval(vmin, vmax) |
1743 | | - return super().set_view_interval(vmin, vmax) |
1744 | | - |
1745 | | - @_api.deprecated("3.5", alternative="`.Axis.set_data_interval`") |
1746 | | - def set_data_interval(self, vmin, vmax): |
1747 | | - self._wrapped_locator.set_data_interval(vmin, vmax) |
1748 | | - return super().set_data_interval(vmin, vmax) |
1749 | | - |
1750 | 1739 | def __call__(self): |
1751 | 1740 | # if no data have been set, this will tank with a ValueError |
1752 | 1741 | try: |
@@ -1778,52 +1767,6 @@ def _get_interval(self): |
1778 | 1767 | return self._interval |
1779 | 1768 |
|
1780 | 1769 |
|
1781 | | -@_api.deprecated( |
1782 | | - "3.5", |
1783 | | - alternative="``[date2num(datetime.utcfromtimestamp(t)) for t in e]`` or " |
1784 | | - "numpy.datetime64 types") |
1785 | | -def epoch2num(e): |
1786 | | - """ |
1787 | | - Convert UNIX time to days since Matplotlib epoch. |
1788 | | -
|
1789 | | - Parameters |
1790 | | - ---------- |
1791 | | - e : list of floats |
1792 | | - Time in seconds since 1970-01-01. |
1793 | | -
|
1794 | | - Returns |
1795 | | - ------- |
1796 | | - `numpy.array` |
1797 | | - Time in days since Matplotlib epoch (see `~.dates.get_epoch()`). |
1798 | | - """ |
1799 | | - |
1800 | | - dt = (np.datetime64('1970-01-01T00:00:00', 's') - |
1801 | | - np.datetime64(get_epoch(), 's')).astype(float) |
1802 | | - |
1803 | | - return (dt + np.asarray(e)) / SEC_PER_DAY |
1804 | | - |
1805 | | - |
1806 | | -@_api.deprecated("3.5", alternative="`num2date(e).timestamp()<.num2date>`") |
1807 | | -def num2epoch(d): |
1808 | | - """ |
1809 | | - Convert days since Matplotlib epoch to UNIX time. |
1810 | | -
|
1811 | | - Parameters |
1812 | | - ---------- |
1813 | | - d : list of floats |
1814 | | - Time in days since Matplotlib epoch (see `~.dates.get_epoch()`). |
1815 | | -
|
1816 | | - Returns |
1817 | | - ------- |
1818 | | - `numpy.array` |
1819 | | - Time in seconds since 1970-01-01. |
1820 | | - """ |
1821 | | - dt = (np.datetime64('1970-01-01T00:00:00', 's') - |
1822 | | - np.datetime64(get_epoch(), 's')).astype(float) |
1823 | | - |
1824 | | - return np.asarray(d) * SEC_PER_DAY - dt |
1825 | | - |
1826 | | - |
1827 | 1770 | @_api.deprecated("3.6", alternative="`AutoDateLocator` and `AutoDateFormatter`" |
1828 | 1771 | " or vendor the code") |
1829 | 1772 | def date_ticker_factory(span, tz=None, numticks=5): |
|
0 commit comments