type: character type of aspect ratio to calculate.
"coords": calculates plot coordinate aspect ratio, which is helpful for creating proper circular shapes, for example, where the x-axis and y-axis ranges are very different. Note that this calculation does also correct for margin sizes.
"plot": calculates plot aspect ratio, based upon the actual size of the plot, independent of the numeric coordinate range of the plot. This aspect ratio reflects the relative visual height and width of the plot area, ignoring margins.
"device": calculates plot aspect ratio, based upon the complete graphical device, i.e. the full space including all panels, margins, and plot areas.
parUsr, parPin, parDin: numeric values equivalent to their respective graphics::par() output, from graphics::par("usr"), graphics::par("pin"), and graphics::par("din"). Values can be supplied directly, which among other things, prevents opening a graphical device if one is not already opened. Any call to graphics::par() will otherwise cause a graphic device to be opened, which may not be desired on a headless R server.
...: additional parameters are ignored.
Returns
numeric plot aspect ratio for a plot device, of the requested type, see the type argument.