A large intersection size can be driven by a large number of members in a group; to account for that, one can divide the intersection size by the size of a union of the same groups. This cannot be calculated for the null intersection (observations which do not belong to either of the groups).
intersection_ratio(
mapping = aes(),
counts = TRUE,
bar_number_threshold = 0.75,
text_colors = c(on_background = "black", on_bar = "white"),
text = list(),
text_mapping = aes(),
mode = "distinct",
denominator_mode = "union",
...
)additional aesthetics for geom_bar()
whether to display count number labels above the bars
if less than one, labels for bars height greater than this threshold will be placed on (not above) the bars
a name vector of characters specifying the color when on_background and on_bar (see bar_number_threshold)
additional parameters passed to geom_text()
additional aesthetics for geom_text()
region selection mode, defines which intersection regions will be accounted for when computing the size. See get_size_mode() for accepted values.
region selection mode for computing the denominator in ratio. See get_size_mode() for accepted values.
Arguments passed on to intersection_size
positionposition passed to geom_bar()