ggplot2
ggplot2 copied to clipboard
Standardising calls to `gpar()`
Throughout ggplot2's codebase, there are various calls to grid::gpar()
.
There are several operations that happen almost ubiquitously, like the following gpar(lwd = len0_null(linewidth * .pt))
.
The suggestion here is to write a wrapper for grid::gpar()
that automatically applies such adjustments and ensures the absence of 0-length vectors, which I believe would result in cleaner code.