draw_gridtext_groups: Draw boundary around groups of gridtext labels

draw_gridtext_groupsR Documentation

Draw boundary around groups of gridtext labels

Description

Draw boundary around groups of gridtext labels

Usage

draw_gridtext_groups(
  g_labels,
  gdf,
  segment_df = NULL,
  adjust_center = FALSE,
  do_draw = TRUE,
  verbose = FALSE,
  ...
)

Arguments

g_labels

richtext_grob class as returned by gridtext::richtext_grob().

gdf

data.frame with one row per grob in g_labels, with colnames "x", "y", "overlap_set", "r", "r_unit", "border_col", "box_fill". The rows are grouped using c("x", "y", "overlap_set"). The "r" and "r_unit" values are used to define the radius and radius unit for the rounded corner. The row in gdf with the highest "r" value is the reference row, for the "r" radius, and the "border_col" and "box_fill" values.

segment_df

data.frame with segment coordinates, optional.

adjust_center

logical indicating whether to adjust the x-centering for a group of labels when adjx=0.5, using the total width of the group of labels. When FALSE (default) the label x-position is not adjusted, which assumes labels are already oriented properly with respect to the x-axis position. This option is FALSE specifically for two-column labels positioned around a fixed centerpoint, where one column could be wider than the other, and it would otherwise push the other column the other way.

do_draw

logical indicating whether to draw the finished result in the context of the current open graphics device.

verbose

logical indicating whether to print verbose output.

...

additional arguments are ignored.

Details

This function is an internal function used to take individual labels defined by gridtext::richtext_grob(), and creating grid::roundrectGrob() objects that cover each group of labels with one rounded rectangular boundary.

See Also

Other venndir label: reposition_venn_gridtext_labels()


jmw86069/venndir documentation built on June 15, 2024, 1:52 p.m.