comparison plotss.py @ 40:3c01bd3f2786

Tabs don't work when saving a file, or on windows so don't use them.
author Daniel O'Connor <darius@dons.net.au>
date Wed, 28 Sep 2011 12:32:44 +0930
parents c6089f1ecc75
children 91b476ebc0f2
comparison
equal deleted inserted replaced
39:c6089f1ecc75 40:3c01bd3f2786
12 xdata = dfile.freqs / 1e6 12 xdata = dfile.freqs / 1e6
13 ydata = dfile.powers 13 ydata = dfile.powers
14 pylab.title("Tag \'" + dfile['TAG'] + "\' at " + dfile['TIMESTAMP']) 14 pylab.title("Tag \'" + dfile['TAG'] + "\' at " + dfile['TIMESTAMP'])
15 pylab.xlabel("Frequency (MHz)") 15 pylab.xlabel("Frequency (MHz)")
16 pylab.ylabel("Level (dBm)") 16 pylab.ylabel("Level (dBm)")
17 annstr = "FStart\t%.2f MHz\nFStop\t%.2f MHz\nPoints\t%d" % ( 17 annstr = "FStart: %.2f MHz\nFStop: %.2f MHz\nPoints: %d" % (
18 float(dfile['FSTART']) / 1e6, 18 float(dfile['FSTART']) / 1e6,
19 float(dfile['FSTOP']) / 1e6, 19 float(dfile['FSTOP']) / 1e6,
20 len(xdata)) 20 len(xdata))
21 pylab.annotate(annstr, xy=(5, -40), xycoords='axes points') 21 pylab.annotate(annstr, xy=(5, -40), xycoords='axes points')
22 22
23 annstr = "Video BW\t%.1f kHz\nResol. BW\t%.1f kHz\nAttenuation\t%.1f dB\nRef Level\t%.1f dBm" % ( 23 annstr = "Video BW: %.1f kHz\nResol. BW: %.1f kHz\nAttenuation: %.1f dB\nRef Level: %.1f dBm" % (
24 float(dfile['VIDBW']) / 1e3, 24 float(dfile['VIDBW']) / 1e3,
25 float(dfile['RESBW']) / 1e3, 25 float(dfile['RESBW']) / 1e3,
26 float(dfile['ATTEN']), 26 float(dfile['ATTEN']),
27 float(dfile['REFLEV'])) 27 float(dfile['REFLEV']))
28 pylab.annotate(annstr, xy=(-140, -55), xycoords='axes points') 28 pylab.annotate(annstr, xy=(-140, -55), xycoords='axes points')