Skip to content

Make hatch colour an rcParam. #7415

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

Merged
merged 1 commit into from
Nov 7, 2016
Merged

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Nov 5, 2016

This turned out easier than I expected because I just had to follow the same work as #6198. As with hatch.linewidth, there is no API to do this, only the rcParam.

Not sure if I should add an explicit test, some other tests kind of implicitly test this stuff (as seen from the updated images.)

Fixes #7166. Also, partially implements #7059.

@QuLogic QuLogic added Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. API: default changes topic: rcparams labels Nov 5, 2016
@QuLogic QuLogic added this to the 2.0 (style change major release) milestone Nov 5, 2016
@efiring
Copy link
Member

efiring commented Nov 6, 2016

You could add a test based on a simplified version of the example in #7166, so that the legend would be tested.

@QuLogic
Copy link
Member Author

QuLogic commented Nov 7, 2016

I added a test based on @dopplershift's shortened test in #7166, which I think basically covers the path hit by legends.

Interestingly, it isn't broken in PDF or SVG because they determine the colour in some other way somehow. In fact, there's even a test test_hatching_legend for PDF in test_backend_pdf.py...

@QuLogic
Copy link
Member Author

QuLogic commented Nov 7, 2016

Hmm, just realized the PDF is broken when using Rectangle without an explicit edge colour, so I must have missed one more place.

@QuLogic
Copy link
Member Author

QuLogic commented Nov 7, 2016

On closer inspection, that may be a bug in evince, as it appears fine in pdf.js, inkscape and convert/imagemagick.

Copy link
Contributor

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

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

This looks good to me (given that this follows the stuff for hatching line width).

@QuLogic QuLogic changed the title Make hatch colour an rcParam. [MRG+1] Make hatch colour an rcParam. Nov 7, 2016
@QuLogic QuLogic changed the title [MRG+1] Make hatch colour an rcParam. [MRG] Make hatch colour an rcParam. Nov 7, 2016
@efiring efiring merged commit 41f4e37 into matplotlib:v2.x Nov 7, 2016
@efiring efiring changed the title [MRG] Make hatch colour an rcParam. Make hatch colour an rcParam. Nov 7, 2016
@QuLogic QuLogic deleted the hatch-colour branch November 7, 2016 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: default changes Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. topic: rcparams
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants