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

Patch brown color and legend geometry placement #538

Merged
merged 2 commits into from
Jan 15, 2020

Conversation

banesullivan
Copy link
Member

@banesullivan banesullivan commented Jan 15, 2020

For some reason the color brown was mapped incorrectly in colors.py... previously it was red-ish.

Also, some markers in the legend would not always be placed correctly becuase they need to be centered at (0,0) - this fixes that

import pyvista as pv
from pyvista import examples

p = pv.Plotter()
p.add_mesh(examples.download_bunny(), label="mesh", color="brown", lighting=False)
p.add_legend()
p.show()

download

now we get

download


Previously misplaced legend markers:

Screen Shot 2020-01-15 at 10 44 34 AM

which are fixed to

Screen Shot 2020-01-15 at 10 44 54 AM

@banesullivan banesullivan self-assigned this Jan 15, 2020
Copy link
Member

@akaszynski akaszynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

colors.py was originally just copied from the matplotlib source, so I'm surprised it wasn't correct since I don't recall brown not being mapped properly.

Thanks for fixing this.

@banesullivan banesullivan merged commit 47ff753 into master Jan 15, 2020
@banesullivan banesullivan deleted the patch/color-legend branch January 16, 2020 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants