Take the 2-minute tour ×

I am very new to audio processing. So please pardon me for the ignorance.

According to the wikipedia, usually x-axis represents time and y-axis represents the frequency or vice-versa. The color intensity represent the amplitude (energy) at a particular time and frequency. This is simple to understand.

I am not able to interpret the spectrogram produced by specgram from the pylab API.


The above figure plots the specgrams with different window sizes (128,512,1024) respectively. Its clear that the x-axis are the frequencies. What do the values between 0 to 1.0 on the y-axis represent?

I'd really appreciate if someone could shed some light into this.

share|improve this question
The easiest way to get a handle on this would be to feed in some sine-wave sweeps at different frequencies and see what you get. –  Ross Bencina Sep 5 '13 at 6:16
@tcaswell Thanx! I did go through the help before asking. I wasn't clear that's why I asked here. –  Geekster Sep 9 '13 at 6:25
add comment

1 Answer

up vote 0 down vote accepted

From looking at the image, and the correlation between the waveform plot and the spectrogram you are incorrect to presume that the x-axis is frequency.

The x-axis is time. I would guess that it's measured in samples. It is unclear why the spectrogram has x labels half the time-domain plot.

The y-axis on the coloured spectrogram plots is frequency, most probably normalised from 0 to Nyquist (half sampling rate). For example, assuming an 8000Hz sampling rate, the y-axis [0.0, 1.0] -> [0.0Hz, 4000Hz]

share|improve this answer
Thanx! That helped. –  Geekster Sep 5 '13 at 6:58
add comment

Your Answer


