You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*Issue*
Date Locators are a subclass of `matplotlib.ticker.Locator`
and they should override the `tick_values` method.
This method allows Locators to be queried for tick locations
using two limits. Without `tick_values` this only axes with
data on them can get tick locations by calling on the `Locator`
object. Or the user has to go through the hussle of creating
dummy axes, add data to them, then use `Locator`.
*Problem*
The date Locators have implemented the tick generation logic
in the `__call__` method. This is in contrast with the
`Locators` implemented in `matplotlib.ticker` for which
the `__call__` method gets the limits from the axes and then
lets `tick_values` to do the the rest.
*Solution*
- Have the `__call__` method of the date Locators get the limits
and let `tick_values` do the calculations.
- Make `MicrosecondLocator.__call__` access the axes using the
same helper method that the other date Locators use.
- Make sure all the Date Locators return empty lists if the
axes are empty instead of some raising `ValueError`s while
others do not.
- For the tests,
`matplotlib.tests.test_dates:test_auto_date_locator`
is still appropriate. All the Locators are tested in there.
0 commit comments