8000 DOC: Add headings to mlab wrappers in Axes. · matplotlib/matplotlib@910d0eb · GitHub
[go: up one dir, main page]

Skip to content

Commit 910d0eb

Browse files
committed
DOC: Add headings to mlab wrappers in Axes.
1 parent 8135ab3 commit 910d0eb

File tree

1 file changed

+66
-31
lines changed

1 file changed

+66
-31
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 66 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6542,6 +6542,8 @@ def psd(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
65426542
65436543
If len(*x*) < *NFFT*, it will be zero padded to *NFFT*.
65446544
6545+
Parameters
6546+
----------
65456547
*x*: 1-D array or sequence
65466548
Array or sequence containing the data
65476549
@@ -6563,6 +6565,8 @@ def psd(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
65636565
Whether to include the line object plotted in the returned values.
65646566
Default is False.
65656567
6568+
Returns
6569+
-------
65666570
If *return_line* is False, returns the tuple (*Pxx*, *freqs*).
65676571
If *return_line* is True, returns the tuple (*Pxx*, *freqs*. *line*):
65686572
@@ -6577,24 +6581,27 @@ def psd(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
65776581
The line created by this function.
65786582
Only returend if *return_line* is True.
65796583
6584+
Notes
6585+
-----
65806586
For plotting, the power is plotted as
65816587
:math:`10\log_{10}(P_{xx})` for decibels, though *Pxx* itself
65826588
is returned.
65836589
6584-
References:
6590+
References
6591+
----------
65856592
Bendat & Piersol -- Random Data: Analysis and Measurement
65866593
Procedures, John Wiley & Sons (1986)
65876594
65886595
kwargs control the :class:`~matplotlib.lines.Line2D` properties:
65896596
65906597
%(Line2D)s
65916598
6592-
**Example:**
6593-
6599+
Examples
6600+
--------
65946601
.. plot:: mpl_examples/pylab_examples/psd_demo.py
65956602
6596-
.. seealso::
6597-
6603+
See Also
6604+
--------
65986605
:func:`specgram`
65996606
:func:`specgram` differs in the default overlap; in not
66006607
returning the mean of the segment periodograms; in returning
@@ -6669,6 +6676,8 @@ def csd(self, x, y, NFFT=None, Fs=None, Fc=None, detrend=None,
66696676
If len(*x*) < *NFFT* or len(*y*) < *NFFT*, they will be zero
66706677
padded to *NFFT*.
66716678
6679+
Parameters
6680+
----------
66726681
*x*, *y*: 1-D arrays or sequences
66736682
Arrays or sequences containing the data
66746683
@@ -6690,6 +6699,8 @@ def csd(self, x, y, NFFT=None, Fs=None, Fc=None, detrend=None,
66906699
Whether to include the line object plotted in the returned values.
66916700
Default is False.
66926701
6702+
Returns
6703+
-------
66936704
If *return_line* is False, returns the tuple (*Pxy*, *freqs*).
66946705
If *return_line* is True, returns the tuple (*Pxy*, *freqs*. *line*):
66956706
@@ -6704,24 +6715,27 @@ def csd(self, x, y, NFFT=None, Fs=None, Fc=None, detrend=None,
67046715
The line created by this function.
67056716
Only returend if *return_line* is True.
67066717
6718+
Notes
6719+
-----
67076720
For plotting, the power is plotted as
67086721
:math:`10\log_{10}(P_{xy})` for decibels, though `P_{xy}` itself
67096722
is returned.
67106723
6711-
References:
6724+
References
6725+
----------
67126726
Bendat & Piersol -- Random Data: Analysis and Measurement
67136727
Procedures, John Wiley & Sons (1986)
67146728
67156729
kwargs control the Line2D properties:
67166730
67176731
%(Line2D)s
67186732
6719-
**Example:**
6720-
6733+
Examples
6734+
--------
67216735
.. plot:: mpl_examples/pylab_examples/csd_demo.py
67226736
6723-
.. seealso::
6724-
6737+
See Also
6738+
--------
67256739
:func:`psd`
67266740
:func:`psd` is the equivalent to setting y=x.
67276741
"""
@@ -6772,6 +6786,8 @@ def magnitude_spectrum(self, x, Fs=None, Fc=None, window=None,
67726786
length of *pad_to* and the windowing function *window* is applied to
67736787
the signal.
67746788
6789+
Parameters
6790+
----------
67756791
*x*: 1-D array or sequence
67766792
Array or sequence containing the data
67776793
@@ -6791,6 +6807,8 @@ def magnitude_spectrum(self, x, Fs=None, Fc=None, window=None,
67916807
when a signal is acquired and then filtered and downsampled to
67926808
baseband.
67936809
6810+
Returns
6811+
-------
67946812
Returns the tuple (*spectrum*, *freqs*, *line*):
67956813
67966814
*spectrum*: 1-D array
@@ -6806,12 +6824,12 @@ def magnitude_spectrum(self, x, Fs=None, Fc=None, window=None,
68066824
68076825
%(Line2D)s
68086826
6809-
**Example:**
6810-
6827+
Examples
6828+
--------
68116829
.. plot:: mpl_examples/pylab_examples/spectrum_demo.py
68126830
6813-
.. seealso::
6814-
6831+
See Also
6832+
--------
68156833
:func:`psd`
68166834
:func:`psd` plots the power spectral density.`.
68176835
@@ -6871,6 +6889,8 @@ def angle_spectrum(self, x, Fs=None, Fc=None, window=None,
68716889
Data is padded to a length of *pad_to* and the windowing function
68726890
*window* is applied to the signal.
68736891
6892+
Parameters
6893+
----------
68746894
*x*: 1-D array or sequence
68756895
Array or sequence containing the data
68766896
@@ -6884,6 +6904,8 @@ def angle_spectrum(self, x, Fs=None, Fc=None, window=None,
68846904
when a signal is acquired and then filtered and downsampled to
68856905
baseband.
68866906
6907+
Returns
6908+
-------
68876909
Returns the tuple (*spectrum*, *freqs*, *line*):
68886910
68896911
*spectrum*: 1-D array
@@ -6899,12 +6921,12 @@ def angle_spectrum(self, x, Fs=None, Fc=None, window=None,
68996921
69006922
%(Line2D)s
69016923
6902-
**Example:**
6903-
6924+
Examples
6925+
--------
69046926
.. plot:: mpl_examples/pylab_examples/spectrum_demo.py
69056927
6906-
.. seealso::
6907-
6928+
See Also
6929+
--------
69086930
:func:`magnitude_spectrum`
69096931
:func:`angle_spectrum` plots the magnitudes of the
69106932
corresponding frequencies.
@@ -6949,6 +6971,8 @@ def phase_spectrum(self, x, Fs=None, Fc=None, window=None,
69496971
Data is padded to a length of *pad_to* and the windowing function
69506972
*window* is applied to the signal.
69516973
6974+
Parameters
6975+
----------
69526976
*x*: 1-D array or sequence
69536977
Array or sequence containing the data
69546978
@@ -6962,6 +6986,8 @@ def phase_spectrum(self, x, Fs=None, Fc=None, window=None,
69626986
when a signal is acquired and then filtered and downsampled to
69636987
baseband.
69646988
6989+
Returns
6990+
-------
69656991
Returns the tuple (*spectrum*, *freqs*, *line*):
69666992
69676993
*spectrum*: 1-D array
@@ -6977,12 +7003,12 @@ def phase_spectrum(self, x, Fs=None, Fc=None, window=None,
69777003
69787004
%(Line2D)s
69797005
6980-
**Example:**
6981-
7006+
Examples
7007+
--------
69827008
.. plot:: mpl_examples/pylab_examples/spectrum_demo.py
69837009
6984-
.. seealso::
6985-
7010+
See Also
7011+
--------
69867012
:func:`magnitude_spectrum`
69877013
:func:`magnitude_spectrum` plots the magnitudes of the
69887014
corresponding frequencies.
@@ -7026,6 +7052,8 @@ def cohere(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
70267052
70277053
C_{xy} = \\frac{|P_{xy}|^2}{P_{xx}P_{yy}}
70287054
7055+
Parameters
7056+
----------
70297057
%(Spectral)s
70307058
70317059
%(PSD)s
@@ -7040,12 +7068,15 @@ def cohere(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
70407068
when a signal is acquired and then filtered and downsampled to
70417069
baseband.
70427070
7071+
Returns
7072+
-------
70437073
The return value is a tuple (*Cxy*, *f*), where *f* are the
70447074
frequencies of the coherence vector.
70457075
70467076
kwargs are applied to the lines.
70477077
7048-
References:
7078+
References
7079+
----------
70497080
70507081
* Bendat & Piersol -- Random Data: Analysis and Measurement
70517082
Procedures, John Wiley & Sons (1986)
@@ -7055,8 +7086,8 @@ def cohere(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
70557086
70567087
%(Line2D)s
70577088
7058-
**Example:**
7059-
7089+
Examples
7090+
--------
70607091
.. plot:: mpl_examples/pylab_examples/cohere_demo.py
70617092
"""
70627093
if not self._hold:
@@ -7098,6 +7129,8 @@ def specgram(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
70987129
specified with *noverlap*. The spectrogram is plotted as a colormap
70997130
(using imshow).
71007131
7132+
Parameters
7133+
----------
71017134
*x*: 1-D array or sequence
71027135
Array or sequence containing the data
71037136
@@ -7143,11 +7176,13 @@ def specgram(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
71437176
Additional kwargs are passed on to imshow which makes the
71447177
specgram image
71457178
7146-
.. note::
7147-
7179+
Notes
7180+
-----
71487181
*detrend* and *scale_by_freq* only apply when *mode* is set to
71497182
'psd'
71507183
7184+
Returns
7185+
-------
71517186
Returns the tuple (*spectrum*, *freqs*, *t*, *im*):
71527187
71537188
*spectrum*: 2-D array
@@ -7163,12 +7198,12 @@ def specgram(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
71637198
*im*: instance of class :class:`~matplotlib.image.AxesImage`
71647199
The image created by imshow containing the spectrogram
71657200
7166-
**Example:**
7167-
7201+
Examples
7202+
--------
71687203
.. plot:: mpl_examples/pylab_examples/specgram_demo.py
71697204
7170-
.. seealso::
7171-
7205+
See Also
7206+
--------
71727207
:func:`psd`
71737208
:func:`psd` differs in the default overlap; in returning
71747209
the mean of the segment periodograms; in not returning

0 commit comments

Comments
 (0)
0