Skip to content

[DOC] Undocumented behavior in streamplot #13974

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

Closed
afvincent opened this issue Apr 17, 2019 · 2 comments · Fixed by #20975
Closed

[DOC] Undocumented behavior in streamplot #13974

afvincent opened this issue Apr 17, 2019 · 2 comments · Fixed by #20975
Assignees
Milestone

Comments

@afvincent
Copy link
Contributor

The docstring of ax.streamplot (“only”) states

x, y : 1d arrays
    an evenly spaced grid.

but looking at the actual code in the master branch (through the interface on GitHub website), it seems that a bit more of processing is involved (through the class matplotlib.streamplot.Grid) in order to also allow at least one special case of 2d-arrays for X and Y.

Expected behavior: such special casing being made explicite in the docstring.

@afvincent afvincent self-assigned this Apr 17, 2019
@UnaiSan
Copy link

UnaiSan commented Sep 2, 2021

It seems that Grid objects only work with 2D arrays created as in np.meshgrid(x,y, indexing="xy"), and not as in np.meshgrid(x,y, indexing="ij"). Is there a specific reason for this? I, personally, have always preferred the second way to deal with 2D (or ND) arrays.

@jklymak
Copy link
Member

jklymak commented Sep 2, 2021

Because that is how all our input arrays are provided.

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

Successfully merging a pull request may close this issue.

4 participants