Skip to content

Stackplot takes a transposed Y matrix #4952

Closed as not planned
Closed as not planned

Description

@naught101

pylab.plot() can take y as a matrix. When it does, it treats columns as data series. This makes it work nicely with, for example, pandas dataframes.

pylab.stackplot() takes y as a transposed matrix, where rows are data sereies, to data frames must be transposed. It would be better for consistency if it followed the plot format.

Also, plot() can take a y with no x, and x is generated as range(y.shape[0]) - it'd be great if stackplot allowed this as well.

ref: #819

Activity

  1. added this to the milestone on Aug 18, 2015
  2. added
    API: consistencyConsistency of the matplotlib API, including naming, behavior, defaults, …
    on Aug 18, 2015
  3. modified the milestones: , on Oct 3, 2017
  4. github-actions commented on Mar 16, 2023

    @github-actions

    This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

  5. jklymak commented on Mar 16, 2023

    @jklymak
    Member

    I agree this is inconsistent. However, 11 years later, this seems unlikely to change. Whoever uses stackplot is probably used to its quirks and it seems impossible to change the sense of the matrix order at this late date.

  6. removed this from the future releases milestone on Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    API: consistencyConsistency of the matplotlib API, including naming, behavior, defaults, …

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions