From: Paul Brossier Date: Wed, 2 Aug 2006 11:23:43 +0000 (+0000) Subject: if spectrum shorter than 1 second, use ms not s X-Git-Tag: bzr2git~577 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=778bc7a3e1bb9eed9eeb669dbd20c63879283264;p=aubio.git if spectrum shorter than 1 second, use ms not s if spectrum shorter than 1 second, use ms not s --- diff --git a/python/aubio/gnuplot.py b/python/aubio/gnuplot.py index 3e508865..69c02b54 100644 --- a/python/aubio/gnuplot.py +++ b/python/aubio/gnuplot.py @@ -122,7 +122,11 @@ def plot_spec(filename, outplot='',extension='', fileout=None, start=0, end=None data,time,freq = audio_to_spec(filename,minf=minf,maxf=maxf,bufsize=bufsize,hopsize=hopsize) xorig = 0. if not noaxis: - g.xlabel('Time (s)') + if max(time) < 1.: + time = [t*1000. for t in time] + g.xlabel('Time (ms)') + else: + g.xlabel('Time (s)') g.ylabel('Frequency (Hz)') g('set size %f,%f' % (xsize, ysize)) g('set pm3d map')