From 778bc7a3e1bb9eed9eeb669dbd20c63879283264 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Wed, 2 Aug 2006 11:23:43 +0000 Subject: [PATCH] if spectrum shorter than 1 second, use ms not s if spectrum shorter than 1 second, use ms not s --- python/aubio/gnuplot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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') -- 2.26.2