I'm trying to remove the white spaces padding matplotlib's generated spectrogram. I've tried setting a limit to the axis and setting tight to the axis but these don't work.
Thanks
I'm trying to remove the white spaces padding matplotlib's generated spectrogram. I've tried setting a limit to the axis and setting tight to the axis but these don't work.
Thanks
You can use plt.xlim()
and plt.ylim()
with the desired limits.
Your plt.axis(...)
should have done, try to run it after the plot.
Similar question, and another.