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> &lt;<a href="mailto:kent37@tds.net">kent37@tds.net</a>&gt; 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>&gt; hey there,<br>&gt; i am trying to use a graph and chart app called matplotlib, but i cannot<br>&gt; figgure out how to have it plot a simple chart over time.<br>&gt; the docs say to use the function plot_date() but i cannot seem to get
<br>&gt; the values to agree.<br>&gt; I am sending datetimes to the charting app for x, and the y is a list of<br>&gt; values that the our equipment reports.<br>&gt; sometimes there are lots of reports in a row, and i would like the chart
<br>&gt; to show it like that instead of plotting out every time as an evenly<br>&gt; spaced tick on the x scale. Does this make any sense, what i am after<br>&gt; here? Anyway, if any of you have much experience with this sort of
<br>&gt; thing, or may suggest a package (pylab is my first attempt) please send<br>&gt; 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(&quot;%H:%M&quot;))<br><br><br>I called pylab.scatter() to create the plot.<br><br>HTH,<br>Kent<br><br></blockquote></div><br>