Skip to content

Rename (N, M) -> (M, N) array-like #20533

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 1 commit into from
Jun 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ def heatmap(data, row_labels, col_labels, ax=None,
Parameters
----------
data
A 2D numpy array of shape (N, M).
A 2D numpy array of shape (M, N).
row_labels
A list or array of length N with the labels for the rows.
A list or array of length M with the labels for the rows.
col_labels
A list or array of length M with the labels for the columns.
A list or array of length N with the labels for the columns.
ax
A `matplotlib.axes.Axes` instance to which the heatmap is plotted. If
not provided, use current axes or create a new one. Optional.
Expand Down
2 changes: 1 addition & 1 deletion examples/lines_bars_and_markers/filled_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def stack_hist(ax, stacked_data, sty_cycle, bottoms=None,
The axes to add artists too

stacked_data : array or Mapping
A (N, M) shaped array. The first dimension will be iterated over to
A (M, N) shaped array. The first dimension will be iterated over to
compute histograms row-wise

sty_cycle : Cycler or operable of dict
Expand Down
8 changes: 4 additions & 4 deletions lib/matplotlib/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -1577,13 +1577,13 @@ def _initialize_x_y(self, z):

*X* and *Y* must both be 2D with the same shape as *Z* (e.g.
created via `numpy.meshgrid`), or they must both be 1-D such
that ``len(X) == M`` is the number of columns in *Z* and
``len(Y) == N`` is the number of rows in *Z*.
that ``len(X) == N`` is the number of columns in *Z* and
``len(Y) == M`` is the number of rows in *Z*.

If not given, they are assumed to be integer indices, i.e.
``X = range(M)``, ``Y = range(N)``.
``X = range(N)``, ``Y = range(M)``.

Z : (N, M) array-like
Z : (M, N) array-like
The height values over which the contour is drawn.

levels : int or array-like, optional
Expand Down