Hallo!
(Sorry if this is maybe a basic question, but I did not find something in the archives or in the net)
I am trying to make a spectrogram of audio data with the function "specgram", where the frequency axis is logarithmic (as it is used usually in audio/speech processing).
However, "specgram" uses a linear frequency axis by default and I was not able to change this behaviour ...
So my question: is it possible to get a logarithmic frequency axis with specgram or any other function ?
Many thanks for any hints,
LG
Georg
Georg Holzmann wrote:
Hallo!
(Sorry if this is maybe a basic question, but I did not find something in the archives or in the net)
I am trying to make a spectrogram of audio data with the function "specgram", where the frequency axis is logarithmic (as it is used usually in audio/speech processing).
However, "specgram" uses a linear frequency axis by default and I was not able to change this behaviour ...
So my question: is it possible to get a logarithmic frequency axis with specgram or any other function ?
One way would be to use the NonUniformImage class in image.py instead of the Image class that is being used by the imshow() call in Axes.specgram. See examples/pcolor_nonuniform.py for an example of how to use the NonUniformImage class.
Eric
ยทยทยท
Many thanks for any hints,
LG
Georg
Hallo!
Thanks for your answer !
One way would be to use the NonUniformImage class in image.py instead of the Image class that is being used by the imshow() call in Axes.specgram.
Hm ... I looked into image.py but I don't know how this is used by specgram (sorry, I am a newbie - and did not find more about specgram in the matplotlib source (where is the specgram source?)).
Could you maybe give some more hints how I would have to do this ? (or are there maybe examples in which I can look?)
Or did nobody else use a logarithmic spectrogram before ?
Thanks,
LG
Georg