As written, all of these methods calculate the aspect ratio (x
/y), but bank_slopes
will return (y / x) to be compatible
with link[ggplot2]{coord_fixed()}
.
Median Absolute Slopes Banking
Let the aspect ratio be \(\alpha = \frac{w}{h}\)
then the median absolute slop banking is the
\(\alpha\) such that,
$$
median \left| \frac{s_i}{\alpha} \right| = 1
$$
Let \(R_z = z_{max} - z_{min}\) for \(z = x, y\),
and \(M = median \| s_i \|\). Then,
$$
\alpha = M \frac{R_x}{R_y}
$$
Average Absolute Slope Banking
Let the aspect ratio be \(\alpha = \frac{w}{h}\).
then the mean absolute slope banking is the
\(\alpha\) such that,
$$
mean \left| \frac{s_i}{\alpha} \right| = 1
$$
Heer and Agrawala (2006) and Cleveland discuss several other methods
including average (weighted) orientation, and global and local orientation resolution.
These are no longer implemented in this function. In general, either the
median or average absolute slopes will produce reasonable results without
requiring optimization.