File: timedata.py

package info (click to toggle)
wxmplot 0.9.58-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,052 kB
  • sloc: python: 10,085; makefile: 88; sh: 2
file content (19 lines) | stat: -rw-r--r-- 394 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/python

from wxmplot import PlotApp
from datetime import datetime
f = open('time.dat','r')
l = f.readlines()
f.close()
t = []
x = []
for i in l:
    j =  i[:-1].strip().split()
    t.append(datetime.fromtimestamp(float(j[0])))
    x.append(float(j[1]))


app = PlotApp()
app.plot(t, x, use_dates=True, drawstyle='steps-post', marker='+')
app.set_title('Time series data:')
app.run()