Skip to content

Decoupling hatch from edges #7059

Closed
Closed

Description

@mdepitta
  • Fedora 20; Python 2.7.5; Matplotlib 1.4.3 (installed by yum/pip)

I look around but this seems still to be an open issue. Do you confirm it? I have a polygon filled y hatches but I would like to plot only those hatches rather than the edge of the polygon too. Like:

ax.add_artist(mpatches.Polygon(..., ec='none', fc='none', hatch='//'))

But in this fashion, as hatch is bound to ec if I set this latter to none, hatches disappear as well...

Activity

  1. anntzer commented on Sep 8, 2016

    @anntzer
    Contributor

    You could set the linewidth to zero (lw=0), which makes the edge of the polygon invisible but does not affect the hatching.

  2. added this to the milestone on Sep 8, 2016
  3. tacaswell commented on Sep 8, 2016

    @tacaswell
    Member

    API control of the hatching is something that needs work

  4. added
    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
    on Sep 8, 2016
  5. mdepitta commented on Sep 8, 2016

    @mdepitta
    Author

    Thanks.
    The workaround suggested by @anntzer however currently fulfills my aim.
    So let me know if you prefer to keep the issue open or whether I can close it.

  6. tacaswell commented on Sep 8, 2016

    @tacaswell
    Member

    Leave it open, at somepoint we are going to have to go through and collect all of the hatch related issues into a single tracker issue.

  7. modified the milestones: , on Oct 3, 2017
  8. orangeSi commented on May 27, 2019

    @orangeSi

    API control of the hatching is something that needs work

    API control of every hatching is implemented now (something like set_hatch_color)?

  9. tacaswell commented on Apr 8, 2020

    @tacaswell
    Member

    There is control at the graphic context level, but there is not an API at the artist or user facing levels.

  10. github-actions commented on Mar 28, 2023

    @github-actions

    This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

  11. github-actions commented on Apr 22, 2024

    @github-actions

    This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

  12. added
    status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.
    on May 22, 2024
  13. added
    keepItems to be ignored by the “Stale” Github Action
    and removed
    status: inactiveMarked by the “Stale” Github Action
    status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.
    on May 22, 2024
  14. r3kste commented on Dec 4, 2025

    @r3kste
    Contributor

    This has been addressed in #28104. So this issue can be closed.
    The required behavior can be achieved by simply passing the hatchcolor parameter

    ax.add_artist(mpatches.Polygon(..., ec='none', fc='none', hatch='//', hatchcolor="red"))
  15. removed
    keepItems to be ignored by the “Stale” Github Action
    on Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesNew featuretopic: hatch

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions