You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When plotting unstructured meshes with matplotlib PolyCollection, we would like to avoid the edges/lines to be vislible. This can be done with edgecolor="face" but for fine meshes (many small polygons) the width of the edges can become significant and the image is incorrect. This is documented in Deltares/xugrid#203. A better solution would be to use edgecolor="none" or linewidths=0. However, in this case there is still white space showing up between the polygons, even though they should align perfectly.
This second figure is created with edgecolors="face". However, keep in mind that the original xugrid issue linked in the summary also shows that in this specific application this is not desireable. I would expect that this figure without lines would also be the result of edgecolors="none" since all polygons are exactly next to each other.
Additional information
No response
Operating system
Windows 10
Matplotlib Version
3.8.2
Matplotlib Backend
Qt5Agg
Python version
3.11.6
Jupyter version
No response
Installation
pip
The text was updated successfully, but these errors were encountered:
Thanks for the report. This is a fundamental rendering limitation. See #9574 (comment) for a good explanation. Unfortunately there's nothing we can realistically do about it.
Variants of this have been discussed multiple times, e.g. #10115, #1188, #5694.
Thanks for the quick reply and the links, good to know. I searched for open issues but not for closed ones, although I am not sure if I would have found all of this. Either way, we will see how to work around this in that case.
Bug summary
When plotting unstructured meshes with matplotlib PolyCollection, we would like to avoid the edges/lines to be vislible. This can be done with
edgecolor="face"
but for fine meshes (many small polygons) the width of the edges can become significant and the image is incorrect. This is documented in Deltares/xugrid#203. A better solution would be to useedgecolor="none"
orlinewidths=0
. However, in this case there is still white space showing up between the polygons, even though they should align perfectly.Code for reproduction
Actual outcome
Expected outcome
This second figure is created with
edgecolors="face"
. However, keep in mind that the original xugrid issue linked in the summary also shows that in this specific application this is not desireable. I would expect that this figure without lines would also be the result ofedgecolors="none"
since all polygons are exactly next to each other.Additional information
No response
Operating system
Windows 10
Matplotlib Version
3.8.2
Matplotlib Backend
Qt5Agg
Python version
3.11.6
Jupyter version
No response
Installation
pip
The text was updated successfully, but these errors were encountered: