Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -122,7 +122,11 @@ def plot_spec(filename, outplot='',extension='', fileout=None, start=0, end=None · 121 unmodified lines | ||
| 122 | 122 | data,time,freq = audio_to_spec(filename,minf=minf,maxf=maxf,bufsize=bufsize,hopsize=hopsize) |
| 123 | 123 | xorig = 0. |
| 124 | 124 | if not noaxis: |
| 125 | − g.xlabel('Time (s)') | |
| 125 | + if max(time) < 1.: | |
| 126 | + time = [t*1000. for t in time] | |
| 127 | + g.xlabel('Time (ms)') | |
| 128 | + else: | |
| 129 | + g.xlabel('Time (s)') | |
| 126 | 130 | g.ylabel('Frequency (Hz)') |
| 127 | 131 | g('set size %f,%f' % (xsize, ysize)) |
| 128 | 132 | g('set pm3d map') |