reposition_venn_gridtext_labels: Reposition venn gridtext labels

reposition_venn_gridtext_labelsR Documentation

Reposition venn gridtext labels

Description

Reposition venn gridtext labels

Usage

reposition_venn_gridtext_labels(
  g_labels,
  gdf,
  segment_df = NULL,
  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.

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 is an internal function, based upon draw_gridtext_groups() which takes grid grobs already defined in context of an active graphics device, so the actual height and width is defined, and repositions labels for each group of labels.

For example, when the group of labels is connected to a line segment on the right side, the labels will be right-justified so the line segment ends at the right edge of the labels.

Also, this function is intended to allow different "layouts", such as having the set title at top-center, with counts in two columns below the title on the left and right.

See Also

Other venndir label: draw_gridtext_groups()


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