Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
From the original issue: @mkavulich, using your data, I'm now seeing this: and @zarzycki: |
|
Certainly looks better to me, @anissa111! |
erogluorhan
left a comment
There was a problem hiding this comment.
This is great work; thanks Anissa! I can already approve this, but a couple (hopefully small) requests:
- Could it be possible to have polycollection plots default the edge color to be the same as the polygon shading color?
- In the notebook, I like that you showcased grid visualization via edge color adjustments. Would it make sense to add a small admonition to talk about cases where the grid is very fine resolution, this edge coloring would create plotting artifacts (i.e. like the ones we observed, for instance white hazing)?
I was working through this on our slack yesterday, I've come around from my initial opinion and now don't think there's a good way to do this robustly. When I tried adding an edge color, I sometimes got results like this where the edge widths are larger than the polygons themselves. I could set an appropriate line width internally possibly if we knew the proportions of the final figure/dpi/etc, but since we can't know those from just the polycollection, I don't think there's a good way to do it inside of uxarray. Here's an issue from matplotlib where they explain that it's a fundamental limitation of their rendering algorithm related to anti-aliasing and that they don't plan on mitigating it. The hazing is also only something that should come up when an anti-aliased plot is rasterized (in the code or when saving out), see this other example from the slack where the plot is rendered just fine, but shows the a white patch when saved as a png.
I have already added this admonition here that is referencing the hazing we saw during testing, I'll edit it to be a bit more clear and include the bit about fine grid resolution and about anti-aliased rasterization.
|
erogluorhan
left a comment
There was a problem hiding this comment.
@anissa111 thanks for clarifying (and sorry for missing this discussion from Slack); this explains it and let's not aim at having default edge color. Also, thanks for pointing to the admonition. This looks great to me!






Closes #1386
Overview
rolls back changes to
to_polycollectionandto_linecollectionin Support sampling face-centered data onto aGeoAxes#1271No longer forces internal
ccrs.Geodetic()which switches periodic_elements back to default "ignore" instead of "split"removes a block from Add
pixel_ratiooption to.to_raster()#1354 about degenerate polygons causing an issue w/ cartopy:uxarray/uxarray/grid/geometry.py
Lines 478 to 485 in 4b9985d
If anybody could explain to me what this was supposed to be doing, I'd appreciate it.
updates and corrects
mpl.ipynbSee generated
mpl.ipynbPR Checklist
General