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

Skip to content

Commit 7069072

Browse files
author
Stefan Mitic
committed
fix: added check for value of Fs
1 parent 8135aad commit 7069072

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7649,6 +7649,8 @@ def specgram(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
76497649
Z = np.flipud(Z)
76507650

76517651
if xextent is None:
7652+
if Fs is None:
7653+
Fs = freqs[-1] * 2 # default set in mlab._spectral_helper()
76527654
# padding is needed for first and last segment:
76537655
pad_xextent = (NFFT-noverlap) / Fs / 2
76547656
xextent = np.min(t) - pad_xextent, np.max(t) + pad_xextent

0 commit comments

Comments
 (0)