Re: [Matplotlib-users] specgram bug

2012-11-12 Thread G Jones
If you're using pyplot.specgram (i.e. "from pylab import *; specgram(...)"), note that the plot is in dB, hence the negative values. I'm surprised this fact isn't mentioned in the documentation: http://matplotlib.org/api/pyplot_api.html?highlight=specgram#matplotlib.pyplot.specgram However, when i

Re: [Matplotlib-users] specgram bug

2012-11-12 Thread G Jones
Hi, If you trace back into the code further, you will see that the Pxx is computed as X = fft(x), Pxx = X * conj(X) which is real, but the data type will be complex with a ~0 imaginary part (up to floating point precision). Thus the Pxx.real is just to ensure that the resulting data type is real in

[Matplotlib-users] specgram bug

2012-11-12 Thread Paul Anton Letnes
Hi, not 100% sure this is a bug, but here goes: In file matplotlib/lib/matplotlib/mlab.py, the functions psd (power spectral density) and specgram returns the real part of the fourier transform. % grep -n Pxx.real mlab.py 390:return Pxx.real,freqs 470:Pxx = Pxx.real #Needed since helper

Re: [Matplotlib-users] hide ticks and/or labels in the presence of sharex=ax

2012-11-12 Thread Benjamin Root
On Mon, Nov 12, 2012 at 11:43 AM, Nils Wagner wrote: > Hi all, > > how can I hide ticks and/or labels in the presence of sharex=ax. Only > the last subplot 313 should have ticks and labels. > > import matplotlib.pyplot as plt > fig=plt.figure(0,figsize=(16,24)) > > ax = fig.add_subplot(311) > ax.s

[Matplotlib-users] hide ticks and/or labels in the presence of sharex=ax

2012-11-12 Thread Nils Wagner
Hi all, how can I hide ticks and/or labels in the presence of sharex=ax. Only the last subplot 313 should have ticks and labels. import matplotlib.pyplot as plt fig=plt.figure(0,figsize=(16,24)) ax = fig.add_subplot(311) ax.set_xticks([]) ax.set_xticklabels('') ax1 = fig.add_subplot(312,sharex=