I have a series of dates of the form (YYYY, mm, dd, (hh/24)) as output from
the module jd2gcal. hh/24 = the fractional part of a day represented as a
decimal, i.e. 12/24 = 0.5 so my data would look like this for December 21,
2015 at 12:00 UTC:
(2015, 12, 21, 0.5)
Is there a way to convert the above string into a date format suitable for
plotting in MatPlotLib? There doesn't seem to be a format representation
for a fractional day in Python as far as I can tell. I'm a newbie, so type
slowly. J
So you could apply that to a list of your date-tuples like this:
dates = numpy.array([parse_date_tuple(dt) for dt in date_tuple_list])
I didn't test any of this, so caveat emptor and whatnot.
···
On Thu, Jan 12, 2017 at 3:03 PM, Michael Morrone <mikem at oceanweather.com> wrote:
Hello,
I have a series of dates of the form (YYYY, mm, dd, (hh/24)) as output
from the module jd2gcal. hh/24 = the fractional part of a day represented
as a decimal, i.e. 12/24 = 0.5 so my data would look like this for December
21, 2015 at 12:00 UTC:
(2015, 12, 21, 0.5)
Is there a way to convert the above string into a date format suitable for
plotting in MatPlotLib? There doesn?t seem to be a format representation
for a fractional day in Python as far as I can tell. I?m a newbie, so type
slowly. J
Many thanks for any assistance!
Regards,
Mike
Michael Morrone
Meteorologist
Oceanweather, Inc.
mikem at oceanweather.com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users at python.org Matplotlib-users Info Page