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

control hatch linewidth and fill border linewidth separately #4026

Closed
jkokorian opened this issue Jan 22, 2015 · 7 comments
Closed

control hatch linewidth and fill border linewidth separately #4026

jkokorian opened this issue Jan 22, 2015 · 7 comments
Milestone

Comments

@jkokorian
Copy link

It would be awesome if it were possible to control the linewidth of the hatch effect, for example in fill_between. It is now only possible to set the linewidth parameter, but that also gives the filled area a border, which can be undesired. Is it possible to allow for a dictionary to be passed to a "hatch_kwargs" parameter, that allows you to set the linewidth, hatch-style and possibly other things?

In this stackoverflow post (http://stackoverflow.com/questions/11452743/manipulating-linewidth-for-hatching-in-matplotlib?rq=1), I found that the hatch linewidth is hardcoded in C++, so it should be relatively easy to make its value depend on some python input, wouldn't it?

@tacaswell tacaswell added this to the unassigned milestone Jan 22, 2015
@tacaswell
Copy link
Member

@jkokorian Want to take a crack at add that feature? This might not be the gentlest introduction to the library but might be fun!

The code for the hatch width for AGG is now in src/_backend_agg.h (as it is templated c++). I think that the way you would have to get the new information in would be to add it to the graphicsContextBase.

This is also a change that would have to be made across all of the backends.

@jkokorian
Copy link
Author

I will definitely take a crack, but chances are I will get hopelessly stuck. I'm a reasonably accomplished python and c# programmer, but I haven't got much c++ experience...

Like you said, it might be fun!

@jkokorian
Copy link
Author

Mmm, I looked at it quickly but it might be slightly out of my depth. I will have a go anyway, but I might need some tutoring. This is basically the first time I try to mess with the internals of a module that is not 'pure-python'...

@mdboom
Copy link
Member

mdboom commented Jan 23, 2015

As @tacaswell suggested, there's sort of two sides to this. One is creating the API and storage to store the new value (hatch width) with the artist. The other is updating all of the backends to obey it. Most of the backends are in Python, but the Agg one will require a little C++. I can help with the Agg stuff, but can't realistically find the time to tackle the whole thing.

@tacaswell
Copy link
Member

@jkokorian Tutoring/mentoring new contributors in one of the roles of project maintainers. We are all very time-bound so the more people working on the code the better 😃

@QuLogic
Copy link
Member

QuLogic commented Nov 5, 2016

I believe this is fixed by #6198.

@QuLogic QuLogic closed this as completed Nov 5, 2016
@QuLogic QuLogic modified the milestones: 2.0 (style change major release), unassigned Nov 5, 2016
@lzkelley
Copy link
Contributor

Am I correct that there's still no way to set hatch-linewidths for an individual plot object?

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

No branches or pull requests

5 participants