|
From: <jd...@us...> - 2009-06-14 17:24:47
|
Revision: 7219
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7219&view=rev
Author: jdh2358
Date: 2009-06-14 17:24:45 +0000 (Sun, 14 Jun 2009)
Log Message:
-----------
added variant of sf patch 2805653 for specgram kwargs pass thru to imshow
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2009-06-14 05:38:11 UTC (rev 7218)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2009-06-14 17:24:45 UTC (rev 7219)
@@ -7530,14 +7530,14 @@
def specgram(self, x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
window=mlab.window_hanning, noverlap=128,
cmap=None, xextent=None, pad_to=None, sides='default',
- scale_by_freq=None):
+ scale_by_freq=None, **kwargs):
"""
call signature::
specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
window=mlab.window_hanning, noverlap=128,
cmap=None, xextent=None, pad_to=None, sides='default',
- scale_by_freq=None)
+ scale_by_freq=None, **kwargs)
Compute a spectrogram of data in *x*. Data are split into
*NFFT* length segments and the PSD of each section is
@@ -7562,8 +7562,13 @@
The default is (0,max(bins)), where bins is the return
value from :func:`mlab.specgram`
- Return value is (*Pxx*, *freqs*, *bins*, *im*):
+ *kwargs*:
+ Additional kwargs are passed on to imshow which makes the
+ specgram image
+
+ Return value is (*Pxx*, *freqs*, *bins*, *im*):
+
- *bins* are the time points the spectrogram is calculated over
- *freqs* is an array of frequencies
- *Pxx* is a len(times) x len(freqs) array of power
@@ -7590,7 +7595,7 @@
xmin, xmax = xextent
freqs += Fc
extent = xmin, xmax, freqs[0], freqs[-1]
- im = self.imshow(Z, cmap, extent=extent)
+ im = self.imshow(Z, cmap, extent=extent, **kwargs)
self.axis('auto')
return Pxx, freqs, bins, im
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|