Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a1f8b4e

Browse files
committed
Merge pull request #1489 from gitj/master
Documentation update for specgram
2 parents 0f0b79e + 930a9db commit a1f8b4e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/matplotlib/axes.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8604,11 +8604,12 @@ def specgram(self, x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
86048604
cmap=None, xextent=None, pad_to=None, sides='default',
86058605
scale_by_freq=None, **kwargs)
86068606
8607-
Compute a spectrogram of data in *x*. Data are split into
8607+
Compute and plot a spectrogram of data in *x*. Data are split into
86088608
*NFFT* length segments and the PSD of each section is
86098609
computed. The windowing function *window* is applied to each
86108610
segment, and the amount of overlap of each segment is
8611-
specified with *noverlap*.
8611+
specified with *noverlap*. The spectrogram is plotted in decibels
8612+
as a colormap (using imshow).
86128613
86138614
%(PSD)s
86148615
@@ -8647,6 +8648,9 @@ def specgram(self, x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
86478648
spectrum is shown. If *x* is complex, both positive and
86488649
negative parts of the spectrum are shown. This can be
86498650
overridden using the *sides* keyword argument.
8651+
8652+
Also note that while the plot is in dB, the *Pxx* array returned is
8653+
linear in power.
86508654
86518655
**Example:**
86528656

0 commit comments

Comments
 (0)