help with code for DurationFormatter

A runnable code sample is attached.

I'm trying to plot durations in time (sec to hours) on the y axis such
that if you zoom, it changes the units and axis label appropriately.

When run, it looks right. But, when I zoom on the first point, it is
shown on the y axis at '0.20' minutes. I would like it to say '12
seconds'. I would think the FuncFormatter I am trying to use should
be able to do that, but I cannot figure it out. For now, those
attempts are commented out in the code.

How can I create a formatter such that zooming changes the tick and
axis labels in this way?

Any help is appreciated. Thanks,

Che

duration_plot.py (2.93 KB)