yellowbrick
yellowbrick copied to clipboard
Add styles parameter to manual_legend (Redo)
[This is a redo of pull request #1094, since I (the contributor of the original PR) accidentally deleted the fork referenced by that PR.] [One change from the original PR: the original PR included both the manual_legend styles code and code committed as part of #1097. I reverted the commit associated with 1097, so that this PR that you are looking at involves manual_legend improvements only.]
This PR is intended to fully implement issue #566. It includes unit tests for the new feature, and a bug fix for the existing manual_legend test (which failed to enable drawing the legend in the test image). It does not include updated documentation, which I would gladly begin working on upon approval of this PR. Also open to your suggested changes.
Questions for the DistrictDataLabs/team-oz-maintainers:
- I set the default color of a legend entry (when none is specified in the colors nor styles parameter) to black. Please advise if there is a better option.
Checklist:
- [x] Is the commit message formatted correctly?
- [ ] Have you noted the new functionality/bugfix in the release notes of the next release?
- [x] Included a sample plot to visually illustrate your changes? (see baseline image)
- [x] Do all of your functions and methods have docstrings?
- [x] Have you added/updated unit tests where appropriate?
- [x] Have you updated the baseline images if necessary?
- [x] Have you run the unit tests using
pytest? - [x] Is your code style correct (are you using PEP8, pyflakes)?
- [ ] Have you documented your new feature/functionality in the docs?