Auto locator for dates?

Sorry if this question has been asked before: Has anyone

    > written a locator class which acts like the AutoLocator but
    > picks the best DateLocator based on current time span?

    > For date plots, zooming in/out can yield no tick marks or too
    > many tick marks, and I think using such a class can solve
    > this problem. Any suggestion for other approach?

Take a look at Axes.plot_date. It inspects the date range and tries
to pick a good locator and formatter. You could wrap this
functionality into an AutoDateLocator, following the model of
AutoLocator.

There is a slight wrinkle here in that you want an AutoDateFormatter
as well, but this shouldn't be any harder. Again you can reuse the
logic of plot_date to pick the right format string dynamically.

If you succeed, please send it my way and I'll use it in plot_date.

JDH