Plot visual representation of wavelet decomposition

Hi,

I have the following problem: I do a wavelet decomposition on a
signal, sampled at 1 kHz. When I take 1024 datapoints I get
coefficients cD1, cD2, cD3, ... , cD10, cA10, where the 512 cD1
coefficients correspond to the frequencies 250-500 Hz, the next 256
cD2 coefficients are from the 125-250Hz band and so on.

I would now like to do a color coded plot of these coefficients,
x-axis is time, y-axis is frequency, with colors for each coefficient
in it's own area, i.e. the first cD1 must be from 0 to 2 ms and from
250 to 500 Hz, the first cD2 is from 0 to 4 ms, filling 125 to 250 Hz
and so on...

How can I do this in python? I could use imshow of course, but how is
the easiest way to prepare one 1024 x 250? array that hold the
coefficients just like this? Thank you for your help.

Thorsten