Skip to content

[DOC] Undocumented behavior in streamplot #13974

Closed

Description

@afvincent

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.

Activity

  1. self-assigned this
    on Apr 17, 2019
  2. UnaiSan commented on Sep 2, 2021

    @UnaiSan

    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.

  3. jklymak commented on Sep 2, 2021

    @jklymak
    Member

    Because that is how all our input arrays are provided.

  4. added this to the v3.5.0 milestone on Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions