Changeset 421
- Timestamp:
- 07/27/2011 03:36:25 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SHX/trunk/sandbox/traceplotter.py
r420 r421 685 685 canvas.SetPen(wx.Pen('Black', 1)) 686 686 if self.relativeAxis: 687 end = end - start 687 688 start = 0 688 else:689 start = self.start690 689 691 690 if self.traceOrder in [0, 1]: 692 w = width -MARGIN-STATION_INFO693 y = height -TIMESCALE+10691 w = width - MARGIN-STATION_INFO 692 y = height - TIMESCALE + 10 694 693 sx = STATION_INFO 695 694 canvas.DrawLine(sx, y, w+STATION_INFO, y) … … 697 696 chunk = w / 5. 698 697 chunk2 = chunk / 5. 699 chunk_t = (end - start) / 5 698 chunk_t = (end - start) / 5. 700 699 for i in range(5): 701 txt = (start + i*chunk_t).strftime("%H:%M:%S") 700 if isinstance(start, UTCDateTime): 701 timecode = start + i*chunk_t 702 txt = timecode.strftime("%H:%M:%S.") + \ 703 str(timecode.microsecond//1000) 704 else: 705 txt = str(start + i*chunk_t) 706 702 707 tw, _, _, _ = canvas.GetFullTextExtent(txt) 703 708 x = sx+i*chunk
Note: See TracChangeset
for help on using the changeset viewer.