ok, looks like the date2num() function on a datetime.datetime object is working. So cool.<br>i am very new at this, so i may be back ( read probably be back ). Thanks much for the tips.<br>i appreciate it a lot.<br><br>sk<br>
<br><div><span class="gmail_quote">On 10/31/06, <b class="gmail_sendername">Kent Johnson</b> <<a href="mailto:kent37@tds.net">kent37@tds.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
shawn bright wrote:<br>> hey there,<br>> i am trying to use a graph and chart app called matplotlib, but i cannot<br>> figgure out how to have it plot a simple chart over time.<br>> the docs say to use the function plot_date() but i cannot seem to get
<br>> the values to agree.<br>> I am sending datetimes to the charting app for x, and the y is a list of<br>> values that the our equipment reports.<br>> sometimes there are lots of reports in a row, and i would like the chart
<br>> to show it like that instead of plotting out every time as an evenly<br>> spaced tick on the x scale. Does this make any sense, what i am after<br>> here? Anyway, if any of you have much experience with this sort of
<br>> thing, or may suggest a package (pylab is my first attempt) please send<br>> me some advice.<br><br>I have used pylab to create a scatterplot of date vs value. The date<br>values were created by calling pylab.date2num
() on a datetime.datetime<br>value. The axes were set up with this code:<br><br># Set up the xaxis<br>ax = axes([0.05, 0.05, 0.9, 0.9])<br><br>ax.xaxis.set_major_locator(MinuteLocator(interval=10))<br>ax.xaxis.set_minor_locator
(MinuteLocator())<br>ax.xaxis.set_major_formatter(DateFormatter("%H:%M"))<br><br><br>I called pylab.scatter() to create the plot.<br><br>HTH,<br>Kent<br><br></blockquote></div><br>