Visitar URL original
3D collections do not proper handle `edgecolor='face'` · Issue #18931 · matplotlib/matplotlib · GitHub
The Wayback Machine - https://web.archive.org/web/20201111043212/https://github.com/matplotlib/matplotlib/issues/18931
Skip to content
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

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

Open
tacaswell opened this issue Nov 11, 2020 · 0 comments
Open

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

tacaswell opened this issue Nov 11, 2020 · 0 comments

Comments

@tacaswell
Copy link
Member

@tacaswell tacaswell commented Nov 11, 2020

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").

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

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.