Problem plotting one date with plot_date

Hi, I am having a problem with plotting a single piece of

    > data on the graph. This is the code I am trying to run:

    > a = [3] d = [1118188800] new_date =
    > [dates.date2num(datetime.fromtimestamp(d[0]))]

Ahh, that was pesky. The basic problem is how to autoscale the
interval from a single data point. All the naieve ideas

  vmin = p-1
  vmax = p+1

or

  vmin = 1.001*p
  vmax = 0.999*p

can fail badly in some cases. That is what is happening here. You
chose a DayLocator, and the autoscaler did the plus/minus 0.001*p
trick. Since the single date point was 732104.79, the date range was
-732 days to +732 days which is a lot of ticks!

I modified the date tick locators to handle this case automatically
since only the locator can determine a suitable date range from a
single datum.

Changes in CVS.

JDH