Question

I have a 40 seconds recording, of which I plot the spectrogram with pyplot.specgram. I want a vector graphics output out of it.

The output image is large, and when I include it in a PDF it makes it really slow to render. I would like to downscale it, but I don't know how.

I needed to do the same for a waveform, but that was easier because I could just downscale the input, and the waveform would look similar enough. If I downscale the input to the spectrogram, I imagine the frequency will change too, ruining the spectrogram.

How can I downscale the output of specgram maintaining the same input?

Was it helpful?

Solution

Can't you set the dpi on savefig(). I think that


savefig(filename, dpi=75) 
or something around there should make it more manageable. . .

savefig

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top