plot_date() - Correct format to plot

Hi,

I would like to be able to plot dates along the X axis' with values up the
Y. However Im having problems with the correct format in order to pass to
plot_date().

This is what I have so far: (example)

···

####################################
List = [ [datetime.datetime(2008, 7, 12, 5, 12)], ['46.8'] ]

plot_date(List[0], List[1])
#####################################
Returns error:

c = numeric.array(data, dtype=tc, copy=True, order=order)
ValueError: setting an array element with a sequence.
#####################################

I have looked at the pylab example for plot_date, however it uses a drange()
to figure out the dates and doesn't show me how to do it one by one.

Thank you for your time.

View this message in context: http://www.nabble.com/plot_date()---Correct-format-to-plot-tp19181899p19181899.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Hi,

I would like to be able to plot dates along the X axis' with values up the
Y. However Im having problems with the correct format in order to pass to
plot_date().

This is what I have so far: (example)

####################################
List = [ [datetime.datetime(2008, 7, 12, 5, 12)], ['46.8'] ]

plot_date(List[0], List[1])
#####################################
Returns error:

c = numeric.array(data, dtype=tc, copy=True, order=order)
ValueError: setting an array element with a sequence.
#####################################

I have looked at the pylab example for plot_date, however it uses a drange()
to figure out the dates and doesn't show me how to do it one by one.

Hi

Have a look at pylab.date2num()

Mathieu.

···

On Wed, Aug 27, 2008 at 11:14 AM, stuartornum <stuart@...2110...> wrote:

Thank you for your time.
--
View this message in context: http://www.nabble.com/plot_date()---Correct-format-to-plot-tp19181899p19181899.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Thanks,

Worked perfectly.

Mathieu Leplatre-2 wrote:

···

On Wed, Aug 27, 2008 at 11:14 AM, stuartornum <stuart@...2110...> > wrote:

Hi,

I would like to be able to plot dates along the X axis' with values up
the
Y. However Im having problems with the correct format in order to pass to
plot_date().

This is what I have so far: (example)

####################################
List = [ [datetime.datetime(2008, 7, 12, 5, 12)], ['46.8'] ]

plot_date(List[0], List[1])
#####################################
Returns error:

c = numeric.array(data, dtype=tc, copy=True, order=order)
ValueError: setting an array element with a sequence.
#####################################

I have looked at the pylab example for plot_date, however it uses a
drange()
to figure out the dates and doesn't show me how to do it one by one.

Hi

Have a look at pylab.date2num()

Mathieu.

Thank you for your time.
--
View this message in context:
http://www.nabble.com/plot_date()---Correct-format-to-plot-tp19181899p19181899.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--
View this message in context: http://www.nabble.com/plot_date()---Correct-format-to-plot-tp19181899p19306302.html
Sent from the matplotlib - users mailing list archive at Nabble.com.