Skip to content

scatter_matrix is incorrect when using color and non-sorted index #3577

Closed

Description

@shane-kercheval

related to #3576

df = pd.DataFrame({
        'A': [1, 2, 3, 4],
        'B': [1, 2, 3, 4],
        'C': [1, 2, 3, 4],
    },
    index=[3, 2, 1, 0]
)
px.scatter_matrix(df)
px.scatter_matrix(df, color='C')

px.scatter_matrix(df) produces:

Screen Shot 2022-01-31 at 9 51 05 AM

px.scatter_matrix(df, color='C') produces:

Screen Shot 2022-01-31 at 9 49 30 AM

Activity

  1. self-assigned this
    on Jul 3, 2024
  2. removed their assignment
    on Aug 2, 2024
  3. added
    P3
    bug
    on Aug 12, 2024
  4. MarcoGorelli commented on Dec 1, 2024

    @MarcoGorelli
    Contributor

    Hi @shane-kercheval

    Is this your expected output

    Image

    ?

  5. shane-kercheval commented on Dec 2, 2024

    @shane-kercheval
    Author

    Yes, thank you!

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

    P3bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions