Ignore:
Timestamp:
Aug 2, 2006, 5:25:09 PM (18 years ago)
Author:
Paul Brossier <piem@altern.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
33cf541
Parents:
32fa8e8
Message:

factorise gnuplot_create options, update aubioplot-spec/audio
factorise gnuplot_create options, update aubioplot-spec/audio

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/aubioplot-spec

    r32fa8e8 r0ab19df  
    66
    77import sys
    8 from aubio.gnuplot import *
     8from aubio.gnuplot import gnuplot_create,gnuplot_addargs,plot_spec
    99
    1010usage = "usage: %s [options] -i soundfile" % sys.argv[0]
     
    2222                          action="store", dest="minf", default=0.,
    2323                          type='float',help="lower frequency limit")
    24         parser.add_option("-x","--xsize",
    25                           action="store", dest="xsize", default=1.,
    26                           type='float',help="define xsize for plot")
    27         parser.add_option("-y","--ysize",
    28                           action="store", dest="ysize", default=1.,
    29                           type='float',help="define ysize for plot")
    3024        parser.add_option("-l","--log",
    3125                          action="store_true", dest="log", default=False,
    3226                          help="plot on a logarithmic scale")
    33         parser.add_option("-O","--outplot",
    34                           action="store", dest="outplot", default=None,
    35                           help="save plot to output.{ps,png}")
    3627        parser.add_option("-B","--bufsize", type='int',
    3728                          action="store", dest="bufsize", default=8192,
     
    4031                          action="store", dest="hopsize", default=1024,
    4132                          help="overlap size [default=1024]")
     33        gnuplot_addargs(parser)
    4234        (options, args) = parser.parse_args()
    4335        if not options.filename:
     
    5648  outplot = None
    5749
    58 g = gnuplot_create(outplot,extension,xsize=options.xsize, ysize=options.ysize)
     50g = gnuplot_create(outplot,extension,options)
    5951plot_spec(filename, g, log=options.log,
    6052  maxf = options.maxf, minf = options.minf,
Note: See TracChangeset for help on using the changeset viewer.