A few days ago, while trying to draw a nice contour plot for a paper, I accidentally discovered that when you ask the stat_density_2d function to use geom = "polygon" to draw a two dimensional kernel density estimate, it is terribly literal in how it defines polygons. If the line that defines a particular contour runs outside the plot area, it treats it as the end of the line, so the relevant polygon is closed then and there, so to speak.
The problem with having resolved to write about a package every day, besides the fact that it’s a lot of work (but fun too!) is that life gets in the way. I deliberately picked a gap in my teaching schedule to try this, and there’s no way I’d have even considered it before both kids were of school age. I’m most definitely not living from the back of a RAV4, solo parenting, selling a house, and trying to organise a move across the country.