2 import sys
; sys
.path
[:0] = ["../.."]
7 print "datetime import failed (needs python 2.3+) -> test skiped"
11 from pyx
.graph
.axis
import timeaxis
12 from pyx
.graph
import data
14 d
= data
.file("data/timedata", date
=1, value
=2)
15 d
= data
.list([[datetime
.datetime(*(time
.strptime(date
)[:6])), value
] for date
, value
in zip(d
.getcolumn("date"), d
.getcolumn("value"))], x
=1, y
=2)
17 g
= graph
.graphxy(height
=5, x
=timeaxis
.timeaxis(manualticks
=[timeaxis
.timetick(2003, 8, 12),
18 timeaxis
.timetick(2003, 8, 13),
19 timeaxis
.timetick(2003, 8, 14),
20 timeaxis
.timetick(2003, 8, 15),
21 timeaxis
.timetick(2003, 8, 16)],
22 texter
=timeaxis
.timetexter("%d %b")))
24 g
.writeEPSfile("test_timeaxis")