<!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--> <!--You can feel free to delete the sections that do not apply.--> ### Bug report **Bug summary** Unlike the [doc](https://matplotlib.org/3.2.1/api/dates_api.html#matplotlib.dates.AutoDateLocator), the ``intervd`` dictionary has keys of integers, so the example in the doc ("only show every 3 hours") did not work. **Code for reproduction** ```python import matplotlib.dates as mdates locator = mdates.AutoDateLocator() print(locator.intervald) ``` **Actual outcome** ``` { 0: [1, 2, 4, 5, 10, 20, 40, 50, 100, 200, 400, 500, 1000, 2000, 4000, 5000, 10000], 1: [1, 2, 3, 4, 6], 3: [1, 2, 4, 7, 14, 21], 4: [1, 2, 3, 4, 6, 12], 5: [1, 5, 10, 15, 30], 6: [1, 5, 10, 15, 30], 7: [1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000, 100000, 200000, 500000, 1000000] } ``` **Expected outcome** ``` { YEARLY : [1, 2, 4, 5, 10, 20, 40, 50, 100, 200, 400, 500, 1000, 2000, 4000, 5000, 10000], MONTHLY : [1, 2, 3, 4, 6], DAILY : [1, 2, 3, 7, 14], HOURLY : [1, 2, 3, 4, 6, 12], MINUTELY: [1, 5, 10, 15, 30], SECONDLY: [1, 5, 10, 15, 30], MICROSECONDLY: [1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000, 100000, 200000, 500000, 1000000], } ``` **Matplotlib version** * Operating system: macOS 10.14.6 * Matplotlib version: 3.2.1 * Matplotlib backend (`print(matplotlib.get_backend())`): `module://ipykernel.pylab.backend_inline` * Python version: 3.7.7 * Jupyter version (if applicable): ``` jupyter core : 4.6.3 jupyter-notebook : 6.0.3 qtconsole : 4.7.4 ipython : 7.13.0 ipykernel : 5.1.4 jupyter client : 6.1.3 jupyter lab : 1.2.6 nbconvert : 5.6.1 ipywidgets : 7.5.1 nbformat : 5.0.6 traitlets : 4.3.3 ``` * Other libraries: <!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--> <!--If you installed from conda, please specify which channel you used if not the default-->
Activity
ysBach commentedon Jun 16, 2020
Oh my bad, it imports (in the source code)
So it's not a typo. I thought string like keyword for the dict such as
intervd["HOURLY"], but it was not.But I guess a bit of explanation in the doc may be helpful :)