title: Replicating Spectogram of Audacity?
body: <p>I'm trying to plot the spectrograms of audio samples. While I plot it using my code given below, it figures out to be weirder. However, I imported them into audacity which came out to be so nice. Suggest me the changes I need to make in order to replicate the same in python? I would like to know that is the colour map I need to use and what are the changes to be done so that I can acquire an image similar to audacity spectrograms.</p>
  
  <p>Thanks in advance.</p>
  
  <p><i></p>
  
  <pre><code> from scipy import fft
   # other usual libraries 
   N = 8000
   K = 256
   Step = 4
   wind =  0.5*(1 -np.cos(np.array(range(K))*2*np.pi/(K-1) ))
   ffts = []
   S = data_hollow['collection_hollow'][0]
   Spectogram = []
   for j in range(int(Step*N/K)-Step):
      vec = S[int(j * K/Step) : int((j+Step) * K/Step)] * wind
      Spectogram.append(abs(fft(vec,K)[:int(K/2)]))
   Spectogram=np.asarray(Spectogram)
   plt.imshow(Spectogram.T,aspect='auto',origin='auto',cmap='spectral')
   plt.axis('off')
  </code></pre>
  
  <p></i>
  Python Spectogram:</p>
  
  <p><a href="https://i.stack.imgur.com/d13wQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d13wQ.png" alt="enter image description here"></a></p>
  
  <p>Audacity Spectrogram:</p>
  
  <p><a href="https://i.stack.imgur.com/eMuzI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eMuzI.png" alt="enter image description here"></a></p>