[ACCEPTED]-Wavelet plot with Python libraries-pywt

Accepted answer
Score: 13

With a recent trunk version of PyWavelets, getting 10 approximations of scaling function and wavelet 9 function on x-grid is pretty straightforward:

[phi, psi, x] = pywt.Wavelet('db2').wavefun(level=4)

Note 8 that x-grid output is not available in v0.1.6, so 7 if you need that you will have to use the 6 trunk version.

Having that data, you can 5 plot it using your favourite plotting package, for 4 example:

import pylab
pylab.plot(x, psi)

A very similar method is used on 3 wavelets.pybytes.com demo page, but there 2 the charts are done with Google Charts for 1 online presentation.

More Related questions