The flag grobs aren't bounded by the plotting area the way other geom grobs (like pointsGrob) are. This appears in the Rstudio rendering device, and in all of the ggplot2::ggsave devices I tested (PDF and PNG). However, it doesn't appear when I save to SVG using gridSVG::grid.export: in that case, the flags are properly bounded by the plotting area.
This doesn't affect the pointsGrob I'm using as an outline for the flags: even if the flags themselves spill over, the outlines stop at the edge.
This is mostly noticeable because the plotting area is calculated based on the position of geoms, not their size (at least not for geom_flag and geom_point. So if you're using appreciable sizes, it makes sense to expand the plotting domain.
The flag grobs aren't bounded by the plotting area the way other geom grobs (like
pointsGrob) are. This appears in the Rstudio rendering device, and in all of theggplot2::ggsavedevices I tested (PDF and PNG). However, it doesn't appear when I save to SVG usinggridSVG::grid.export: in that case, the flags are properly bounded by the plotting area.This doesn't affect the
pointsGrobI'm using as an outline for the flags: even if the flags themselves spill over, the outlines stop at the edge.This is mostly noticeable because the plotting area is calculated based on the position of geoms, not their size (at least not for
geom_flagandgeom_point. So if you're using appreciable sizes, it makes sense to expand the plotting domain.