Closed ThomasLuypaert closed 1 year ago
Hi Thomas,
Thanks for filing this issue. Unfortunately, there isn't a lot that I can do as the underlying problem originates in the graphics device. In particular, the anti-aliasing setting, that for most but not all devices anti-aliases lines but not fills, causes the Moiré patterning you see as stars in your plot. I wish I had a better solution, but if you can control this with geom_tile(), wouldn't that just work better?
Hi Teun,
Thanks for getting back to me on this so quickly, and for explaining what is causing this issue.
Yes, technically I could achieve the same thing using geom_tile with coord_polar, however there are two issues:
Here is an example of what I mean by point 2 (notice the gap at 00:00):
I've tried setting expand = c(0,0), but that does not solve the issue...
I know this is not an issue with your package, but if you've got any idea on how I might solve this issue with geom_tile, that would be hugely helpful :)
Well you might be interested to try the dev version of ggplot2 for this because drawing rectangles in polar coordinates have been sped up considerably for many rectangles (see https://github.com/tidyverse/ggplot2/pull/5081). I can take a look at the gap issue, but don't know how to reproduce it, so if you have some dummy data + code that makes this gap it would be easier to test solutions.
I'm going to close this issue as I think that the underlying issue is with how graphics devices work, which I don't have a lot of control over from gg4hx's POV.
Hi Teun,
First of all, thanks a lot for making this package, you've saved me a lot of time and trouble trying to plot rasters in the polar coordinate system. I'm using your function to map daily patterns in the occurrence of sound over a certain period. I'm getting very close to the plot I want to produce, with one final hurdle: there are always grey lines in between my pixels.
I've encountered this issue before in ggplot with geom_tile, where this can be resolved by setting both the color and fill options. However, this does not seem to help using geom_polygonraster.
Here is an example of a plot I'm getting:
As you can see, there are faint grey lines between my pixels, which creates a weird star-shaped pattern in some areas of the plot.
Here is the code I'm using to produce this plot:
If you have any suggestions on how this behaviour may be avoided, that would help me out a great deal!
Cheers, Thomas