FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

3D collections do not proper handle `edgecolor='face'` · Issue #18931 · matplotlib/matplotlib · GitHub

Repository navigation

3D collections do not proper handle edgecolor='face' #18931

Closed

Description

Bug report

Bug summary

If the edge color is 'face' on some (all?) of the 3D version of the collections we lose that fact and end up "locking in" the first colors that we render.

Code for reproduction

This test currently fails, it should pass. The issue (once #18929 is merged) fails due to the edges still being jet colored.

@pytest.mark.style('default')
@check_figures_equal(extensions=["png"])
def test_scalarmap_change_cmap(fig_test, fig_ref):

    x, y, z = np.array((list(itertools.product(*[np.arange(0, 5, 1),
                                                 np.arange(0, 5, 1),
                                                 np.arange(0, 5, 1)])))).T
    c = x + y

    # test
    ax_test = fig_test.add_subplot(111, projection='3d')
    sc_test = ax_test.scatter(x, y, z, c=c, s=40, cmap='jet')
    # force a draw
    fig_test.canvas.draw()

    sc_test.set_cmap('viridis')

    # ref
    ax_ref = fig_ref.add_subplot(111, projection='3d')
    sc_ref = ax_ref.scatter(x, y, z, c=c, s=40, cmap='viridis')

Matplotlib version

  • Operating system: any
  • Matplotlib version: default branch
  • Matplotlib backend (print(matplotlib.get_backend())): any
  • Python version: any
  • Jupyter version (if applicable): any
  • Other libraries: --

This is a good first issue because there is no API design, but medium difficulty because it will require splunking through the mplot3D code and deciding the best way to do the book keeping that the edgecolors may be "face" (which means "what ever the face colors are").

Activity

  1. added
    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
    🌱 Good first issueOpen a pull request against these issues if there are no active ones!
    on Nov 11, 2020
  2. added this to the v3.4.0 milestone on Nov 11, 2020
  3. QuLogic commented on Nov 11, 2020

    Member

    I think this would be fixed by #18932; should I incorporate this test there?

  4. modified the milestones: v3.4.0, v3.5.0 on Jan 27, 2021
  5. modified the milestones: v3.5.0, v3.6.0 on Sep 25, 2021
  6. modified the milestones: v3.6.0, v3.7.0 on Jul 8, 2022
  7. divenire05 commented on Dec 30, 2024

    Is this issue still open? Also, do you know what files/parts of the codebase would need to be modified to resolve the bug here?

  8. MiniX16 commented on May 17, 2025

    Contributor

    I just tested it and the tests passes successfully. I guess this issue is just too old. Should I do a PR to add that test with the current tests @QuLogic? If not, I guess this issue should be closed.

  9. QuLogic commented on May 17, 2025

    Member

    If it does work and there isn't another test that covers this, then a PR to add it to the tests would be welcome.

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

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuestopic: mplot3d🌱 Good first issueOpen a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL