Closed
Description
Bug report
Bug summary
Unlike the doc, the intervd
dictionary has keys of integers, so the example in the doc ("only show every 3 hours") did not work.
Code for reproduction
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: