plotting durations

I don’t think there is a built-in way to do this, but
I thought I’d check first. Can matplotlib (somehow)
directly plot a duration of time, such as in the form:
0:01:39.983001 (h:m:s:microsec)

Thanks,
Che

In general, you must first convert your data to floating point (eg
seconds) and then plot that. There is a way of registering custom
types to automate the conversions and axis formatting, however , so it
can be done. This is how we support plotting of python datetime
objects. See for example

  http://matplotlib.sourceforge.net/examples/units/date_converter.html
  http://matplotlib.sourceforge.net/examples/units/date_support.html

and the matplotlib.units module

JDH

···

On Tue, Jan 27, 2009 at 11:00 PM, C M <cmpython@...287...> wrote:

I don't think there is a built-in way to do this, but
I thought I'd check first. Can matplotlib (somehow)
directly plot a duration of time, such as in the form:
0:01:39.983001 (h:m:s:microsec)