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.
Throughout ggplot2's codebase, there are various calls to
grid::gpar()
. There are several operations that happen almost ubiquitously, like the followinggpar(lwd = len0_null(linewidth * .pt))
. The suggestion here is to write a wrapper forgrid::gpar()
that automatically applies such adjustments and ensures the absence of 0-length vectors, which I believe would result in cleaner code.