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
{{ message }}
Repository navigation
[Bug]: diagonal lines in pcolormesh with Gouraud shading and transparency #27016
Just wondering if there's any activity on this one. I routinely plot data on a map using imshow in cartopy, and would like to use a transparency-aware colormap to show a map background over regions of "uninteresting" data. This is pretty standard in earth science visualization, and perhaps in other fields too. However, this bug prevents me from doing that.
changed the title [-][Bug]: diagonal and box lines appearing in pcolormesh due to transparency[/-][+][Bug]: diagonal lines in pcolormesh with Gouraud shading and transparency[/+]on Nov 28, 2023
Yes, I can confirm that this is only a problem for gouraud shading. Unfortunately, other shading options don't work for me unless there's an option to reduce edge width to zero (I tried with edgecolors=None, doesn't do what I want), so I'm stuck with gouraud.
edgecolors='none' should work fine, which is also the default, so maybe open a new issue if that doesn't work for you with a reproducible example using only Matplotlib.
Indeed, edgecolors='none' works fine for plots with just matplotlib on a flat canvas. The issue is when using pcolormesh in cartopy, edgecolors='none' and shading='flat' still draws visible edges. Or perhaps the edges are only visible on non-rectangular projections. I'll open a cartopy ticket for that.
Activity
AgilentGCMS commentedon Nov 28, 2023
Just wondering if there's any activity on this one. I routinely plot data on a map using
imshowincartopy, and would like to use a transparency-aware colormap to show a map background over regions of "uninteresting" data. This is pretty standard in earth science visualization, and perhaps in other fields too. However, this bug prevents me from doing that.jklymak commentedon Nov 28, 2023
Changing the title, as this is only an issue with Gouraud shading...
[-][Bug]: diagonal and box lines appearing in pcolormesh due to transparency[/-][+][Bug]: diagonal lines in pcolormesh with Gouraud shading and transparency[/+]AgilentGCMS commentedon Nov 29, 2023
Yes, I can confirm that this is only a problem for
gouraudshading. Unfortunately, other shading options don't work for me unless there's an option to reduce edge width to zero (I tried withedgecolors=None, doesn't do what I want), so I'm stuck withgouraud.jklymak commentedon Nov 29, 2023
edgecolors='none'should work fine, which is also the default, so maybe open a new issue if that doesn't work for you with a reproducible example using only Matplotlib.AgilentGCMS commentedon Nov 29, 2023
Indeed,
edgecolors='none'works fine for plots with justmatplotlibon a flat canvas. The issue is when usingpcolormeshincartopy,edgecolors='none'andshading='flat'still draws visible edges. Or perhaps the edges are only visible on non-rectangular projections. I'll open acartopyticket for that.AgilentGCMS commentedon Nov 29, 2023
FYI, opened (this issue)[https://github.com/SciTools/cartopy/issues/2295] with
cartopy.