Description
Dear dev team,
it is a known issue that if wrapped in a facet wrap, geom_tile() does not calculate width and height values of tiles correctly for the individual facets. In the issue back then, the submitter solved the issue by using average width and height values. However, this approach may not be valid if axes increments are irregular, because this approach could result in too large tiles, ultimately causing overlaps (also because tiles are, by default, centered over their data value).
To avoid this, for each axis increment, I calculated its distance to the nearest axis increment and used this as height/width value. However, if I compare the output generated using this approach with the output produced by calling geom_tile() without dimension arguments on a subset of the facet_wrap data, the width of tiles calculated by the latter appears slightly larger.
Obviously, I could remove the centering of tiles to their data point and use the distance between increments as width/height values. However, because the distances between increments differ strongly, this may not be valid, as it visually fills the factually incomplete grid.
After checking the documentation, the following questions remain:
- How does geom_tile() calculate width and height values?
- How does geom_tile() prevent overlapping tiles?
- If tiles overlap, what is the resulting value of the tile? Is any aggregated stat calculated?
- Do you have any suggestions on how to get the most accurate representation of my data?
Thank you so much for your help.