Title: ENH: make interval_multiples work for years by jklymak · Pull Request #9841 · matplotlib/matplotlib · GitHub
Open Graph Title: ENH: make interval_multiples work for years by jklymak · Pull Request #9841 · matplotlib/matplotlib
X Title: ENH: make interval_multiples work for years by jklymak · Pull Request #9841 · matplotlib/matplotlib
Description: PR Summary If dates.AutoTickLocator was on the YEARLY frequency, it didn't respect the interval_multiples kwarg. This changes that by using the YearlyLocator if interval_multiples=True (Of course I still think dateticks should be overhauled, but thats a bigger project) Fixes #9838 import datetime import matplotlib.dates as mdates import matplotlib.pyplot as plt import numpy as np x = [datetime.datetime(1966, 1, 1), datetime.datetime(2017, 1, 1)] ticks = [datetime.datetime(i, 1, 1) for i in range(1970, 2020, 10)] y = np.arange(len(x)) fig, ax = plt.subplots() ax.plot_date(x, y) locator = mdates.AutoDateLocator(interval_multiples=True) ax.xaxis.set_major_locator(locator) plt.show() PR Checklist Has Pytest style unit tests Code is PEP 8 compliant New features are documented, with examples if plot related Documentation is sphinx and numpydoc compliant
Open Graph Description: PR Summary If dates.AutoTickLocator was on the YEARLY frequency, it didn't respect the interval_multiples kwarg. This changes that by using the YearlyLocator if interval_multiples=True (Of cou...
X Description: PR Summary If dates.AutoTickLocator was on the YEARLY frequency, it didn't respect the interval_multiples kwarg. This changes that by using the YearlyLocator if interval_multiples=True (Of...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/9841
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:76050d8f-45f9-6ef2-a9e1-72222f3dfc97 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DA52:382280:2AB2DF0:3A3FBDC:6A54910D |
| html-safe-nonce | eb3c1c27e723ecc97d15bc85c316d7a04e3a63e8a8c3303ca1064af7990af32c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTUyOjM4MjI4MDoyQUIyREYwOjNBM0ZCREM6NkE1NDkxMEQiLCJ2aXNpdG9yX2lkIjoiNDg1NzUyMTg4MjI4NTc3MzA2OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8911fbf3289a49c53be45b0970b448589c9bf2c845d2baf683033a817df91ff5 |
| hovercard-subject-tag | pull_request:154410923 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/pull/9841/files |
| twitter:image | https://avatars.githubusercontent.com/u/1562854?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1562854?s=400&v=4 |
| og:image:alt | PR Summary If dates.AutoTickLocator was on the YEARLY frequency, it didn't respect the interval_multiples kwarg. This changes that by using the YearlyLocator if interval_multiples=True (Of cou... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f8cfff6384f62259baea531c7f58bc7040f8dd92 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width