FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

control hatch linewidth and fill border linewidth separately · Issue #4026 · matplotlib/matplotlib · GitHub

Repository navigation

control hatch linewidth and fill border linewidth separately #4026

Closed

Description

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?

Activity

  1. added this to the milestone on Jan 22, 2015
  2. tacaswell commented on Jan 22, 2015

    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.

  3. jkokorian commented on Jan 22, 2015

    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!

  4. jkokorian commented on Jan 23, 2015

    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'...

  5. mdboom commented on Jan 23, 2015

    Member

    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.

  6. tacaswell commented on Jan 23, 2015

    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 😃

  7. QuLogic commented on Nov 5, 2016

    Member

    I believe this is fixed by #6198.

  8. modified the milestones: , on Nov 5, 2016
  9. lzkelley commented on Jul 18, 2017

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL