[Matplotlib-users] Create custom hacth pattern

romeo AKARA roju87 at yahoo.fr
Sun Dec 26 16:40:19 EST 2021


Hello,I am trying to create hatch patterns corresponding to the attached image. I am using the following example: https://stackoverflow.com/questions/17285154/how-to-fill-a-polygon-with-a-custom-hatch-in-matplotlib. Here is an excerpt of my script:hatch_path =Polygon([[0,0], [0, 0.1], [0.1, 0.1], [0.1, 0.2], [0.2, 0.2], [0.2, 0.1],[0.3, 0.1],[0.3, 0],[0.2, 0],[0.2, -0.1],[0.1, -0.1],[0.1, 0]],    closed=True, fill=False).get_path()
The result is not quite what I want. I will appreciate if someone can point me to how best solve this issue.
Thanks,Romeo


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/matplotlib-users/attachments/20211226/e984cbd8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hatch_pattern.png
Type: image/png
Size: 13380 bytes
Desc: not available
URL: <https://mail.python.org/pipermail/matplotlib-users/attachments/20211226/e984cbd8/attachment.png>


More information about the Matplotlib-users mailing list