To do sizing/placement correctly, we need to estimate (plot width)/(device width) & (plot height)/(device height). The reason is that, for anything on a 0-1 scale, we use grid::convertWidth(..., unitTo = "npc")/grid::convertHeight(..., unitTo = "npc"), which uses the width/height of the entire device, but we often want things with respect to the plotting region (e.g., annotations, shapes, etc.)
To do sizing/placement correctly, we need to estimate (plot width)/(device width) & (plot height)/(device height). The reason is that, for anything on a 0-1 scale, we use
grid::convertWidth(..., unitTo = "npc")/grid::convertHeight(..., unitTo = "npc"), which uses the width/height of the entire device, but we often want things with respect to the plotting region (e.g., annotations, shapes, etc.)