Thanks both. I pushed some small changes to the repo so that we don't produce a title now.
I have to specify main = NA internally (after first checking for an explicit user-provided title ofc). Otherwise, we'll get still get an automatic and misleading default.density(x = x) title once it goes through plot2.density. But, failing that, I think that this is otherwise a pretty clean solution.
Same examples from earlier, but confirming that the title is now switched off. Just the atomic version to save space, but I've checked the formula and it's the same.
devtools::load_all("~/Documents/Projects/plot2") #> ℹ Loading plot2 with(airquality, plot2(Temp, type = "density"))
with(airquality, plot2(Temp, type = "density", by = Month, bg = "by"))
Created on 2023-08-17 with reprex v2.0.2