Skip to content

DOC: Fix type annotation for order parameter in Epochs.plot()#13639

Open
YadavAkhileshh wants to merge 1 commit intomne-tools:mainfrom
YadavAkhileshh:fix-epochs-plot-order-docs
Open

DOC: Fix type annotation for order parameter in Epochs.plot()#13639
YadavAkhileshh wants to merge 1 commit intomne-tools:mainfrom
YadavAkhileshh:fix-epochs-plot-order-docs

Conversation

@YadavAkhileshh
Copy link

Reference issue

Fixes #13638

What does this implement/fix?

This PR corrects the documentation for the order parameter in the Epochs plotting function.

The docstring previously stated that the parameter accepted an "array of strings," but it actually requires an array of integers (channel indices). I have updated the type definition and expanded the description to be consistent with the other plotting functions in the library.

Additional information

Fixing this discrepancy ensures that users can rely on the documentation without needing trial-and-error to figure out the correct input type for channel ordering.

Copy link
Contributor

@scott-huberty scott-huberty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple nitpicks. Otherwise this looks correct and matches the docstring for the order parameter in raw.plot!

Defaults to ``None``.
order : array of str | None
Order in which to plot channel types.
order : array of int | None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
order : array of int | None
order : array-like of int | None

Order in which to plot channel types.
order : array of int | None
Order in which to plot data. If the array is shorter than the number of
channels, only the given channels are plotted. If None (default), all
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
channels, only the given channels are plotted. If None (default), all
channels, only the given channels are plotted. If ``None`` (default), all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong documentation on order parameter in Epochs.plot()

2 participants