Currently coord_munch() only munches the line segments between the start and end, that is, it doesn't automatically munch the closing of polygons, leading to weird straight edges when e.g. plotting polygons with coord_polar()... geom_rect() circumvents this by converting the rectangle to a closed form polygon, but such an operation is not done in e.g. geom_polygon(). In any way, this should be the responsibility of coord_munch() and not the individual geoms, as the polygon representation in grid is strictly open-form.
The easiest fix is probably to add a switch to coord_munch() to differentiate between open and closed shapes, and then have closed shape geoms identify themselves as such to the muncher
Currently
coord_munch()only munches the line segments between the start and end, that is, it doesn't automatically munch the closing of polygons, leading to weird straight edges when e.g. plotting polygons withcoord_polar()...geom_rect()circumvents this by converting the rectangle to a closed form polygon, but such an operation is not done in e.g.geom_polygon(). In any way, this should be the responsibility ofcoord_munch()and not the individual geoms, as the polygon representation in grid is strictly open-form.The easiest fix is probably to add a switch to
coord_munch()to differentiate between open and closed shapes, and then have closed shape geoms identify themselves as such to the muncher