-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Minor cleanup of acorr/xcoor docs #14197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1905,19 +1905,25 @@ def acorr(self, x, **kwargs): | |
|
||
Parameters | ||
---------- | ||
|
||
x : sequence of scalar | ||
x : array-like | ||
|
||
detrend : callable, optional, default: `mlab.detrend_none` | ||
*x* is detrended by the *detrend* callable. Default is no | ||
normalization. | ||
*x* is detrended by the *detrend* callable. This must be a | ||
function ``x = detrend(x)`` accepting and returning an | ||
`numpy.array`. Default is no normalization. | ||
|
||
normed : bool, optional, default: True | ||
If ``True``, input vectors are normalised to unit length. | ||
|
||
usevlines : bool, optional, default: True | ||
If ``True``, `Axes.vlines` is used to plot the vertical lines from | ||
the origin to the acorr. Otherwise, `Axes.plot` is used. | ||
Determines the plot style. | ||
|
||
If ``True``, vertical lines are plotted from 0 to the acorr value | ||
using `Axes.vlines`. Additionally, a horizontal line is plotted | ||
at y=0 using `Axes.axhline`. | ||
|
||
If ``False``, makers are plotted at the acorr values using | ||
`Axes.plot`. | ||
|
||
maxlags : int, optional, default: 10 | ||
Number of lags to show. If ``None``, will return all | ||
|
@@ -1926,24 +1932,27 @@ def acorr(self, x, **kwargs): | |
Returns | ||
------- | ||
lags : array (length ``2*maxlags+1``) | ||
lag vector. | ||
The lag vector. | ||
c : array (length ``2*maxlags+1``) | ||
auto correlation vector. | ||
The auto correlation vector. | ||
line : `.LineCollection` or `.Line2D` | ||
`.Artist` added to the axes of the correlation. | ||
`.Artist` added to the axes of the correlation: | ||
|
||
`.LineCollection` if *usevlines* is True | ||
`.Line2D` if *usevlines* is False | ||
- `.LineCollection` if *usevlines* is True. | ||
- `.Line2D` if *usevlines* is False. | ||
b : `.Line2D` or None | ||
Horizontal line at 0 if *usevlines* is True | ||
None *usevlines* is False | ||
None *usevlines* is False. | ||
|
||
Other Parameters | ||
---------------- | ||
linestyle : `.Line2D` property, optional, default: None | ||
Only used if usevlines is ``False``. | ||
linestyle : `.Line2D` property, optional | ||
The linestyle for plotting the data points. | ||
Only used if *usevlines* is ``False``. | ||
|
||
marker : str, optional, default: 'o' | ||
The marker for plotting the data points. | ||
Only used if *usevlines* is ``False``. | ||
|
||
Notes | ||
----- | ||
|
@@ -1964,47 +1973,56 @@ def xcorr(self, x, y, normed=True, detrend=mlab.detrend_none, | |
|
||
Parameters | ||
---------- | ||
x : sequence of scalars of length n | ||
x : array-like of length n | ||
|
||
y : sequence of scalars of length n | ||
y : array-like of length n | ||
|
||
detrend : callable, optional, default: `mlab.detrend_none` | ||
*x* is detrended by the *detrend* callable. Default is no | ||
normalization. | ||
*x* and *y* are detrended by the *detrend* callable. This must be a | ||
function ``x = detrend(x)`` accepting and returning an | ||
`numpy.array`. Default is no normalization. | ||
|
||
normed : bool, optional, default: True | ||
If ``True``, input vectors are normalised to unit length. | ||
|
||
usevlines : bool, optional, default: True | ||
If ``True``, `Axes.vlines` is used to plot the vertical lines from | ||
the origin to the acorr. Otherwise, `Axes.plot` is used. | ||
Determines the plot style. | ||
|
||
maxlags : int, optional | ||
If ``True``, vertical lines are plotted from 0 to the xcorr value | ||
using `Axes.vlines`. Additionally, a horizontal line is plotted | ||
at y=0 using `Axes.axhline`. | ||
|
||
If ``False``, makers are plotted at the xcorr values using | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. markers |
||
`Axes.plot`. | ||
|
||
maxlags : int, optional, default: 10 | ||
Number of lags to show. If None, will return all ``2 * len(x) - 1`` | ||
lags. Default is 10. | ||
lags. | ||
|
||
Returns | ||
------- | ||
lags : array (length ``2*maxlags+1``) | ||
lag vector. | ||
The lag vector. | ||
c : array (length ``2*maxlags+1``) | ||
auto correlation vector. | ||
The auto correlation vector. | ||
line : `.LineCollection` or `.Line2D` | ||
`.Artist` added to the axes of the correlation | ||
`.Artist` added to the axes of the correlation: | ||
|
||
`.LineCollection` if *usevlines* is True | ||
`.Line2D` if *usevlines* is False | ||
- `.LineCollection` if *usevlines* is True. | ||
- `.Line2D` if *usevlines* is False. | ||
b : `.Line2D` or None | ||
Horizontal line at 0 if *usevlines* is True | ||
None *usevlines* is False | ||
None *usevlines* is False. | ||
|
||
Other Parameters | ||
---------------- | ||
linestyle : `.Line2D` property, optional | ||
Only used if usevlines is ``False``. | ||
The linestyle for plotting the data points. | ||
Only used if *usevlines* is ``False``. | ||
|
||
marker : string, optional | ||
Default is 'o'. | ||
marker : str, optional, default: 'o' | ||
The marker for plotting the data points. | ||
Only used if *usevlines* is ``False``. | ||
|
||
Notes | ||
----- | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note:
xcorr(usevlines=True)
does already produce a horizontal line. So this is redundant.