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

Permit color and legend customization #292

merged 3 commits into from Dec 13, 2020


Copy link

@dschwen dschwen commented Dec 11, 2020

Closes #291

Copy link
Contributor Author

dschwen commented Dec 12, 2020

Ok, I see, I need to import phase_legend. Is that the best design I can do, repeatedly specifying the same default value at all levels?

Copy link

codecov bot commented Dec 12, 2020

Codecov Report

Merging #292 (0175a9e) into develop (8ed33ba) will increase coverage by 0.04%.
The diff coverage is 71.42%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #292      +/-   ##
+ Coverage    86.73%   86.77%   +0.04%     
  Files           46       46              
  Lines         4462     4461       -1     
+ Hits          3870     3871       +1     
+ Misses         592      590       -2     
Impacted Files Coverage Δ
pycalphad/plot/binary/ 21.21% <50.00%> (+2.46%) ⬆️
pycalphad/plot/ 69.89% <50.00%> (+1.47%) ⬆️
pycalphad/plot/binary/ 87.25% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8ed33ba...0175a9e. Read the comment docs.

Copy link
Contributor Author

dschwen commented Dec 12, 2020

Looks to me that the failed code coverage test complains about lines that weren't tested before either. :-/

Copy link

Thanks @dschwen! These changes go a long way in allowing users to customize the look and feel of their phase diagrams. I made a few smalls changes to the docstrings to better match how matplotlib describes their colors API (e.g. you could use this to provide any valid MPL color as a tieline_color, not just RGBA values) and I made the tieline_color arguments immutable tuples instead of mutable lists.

I'm not worried about the codecov/patch check failing. Our test suite just has some small integration tests over the plotting API, since it's more difficult to test the correctness of the graphics produced.

@bocklund bocklund merged commit d217b4b into pycalphad:develop Dec 13, 2020
@bocklund bocklund added this to the 0.8.5 milestone Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

Enable color and legend customization in eqplot
2 participants