Build polygons from plot data for fancy headers built into the plot area

build_header_polygons(
  data,
  anno,
  grouping,
  group_order = NULL,
  ymin,
  label_height = 25,
  fraction_of_label = 0.1,
  poly_type = "angle"
)

Arguments

data

A data.frame containing joined annotations and expression data

grouping

The base to use for grouping samples.

ymin

The minimum y value for the bottom of the headers. In gene plot contexts, this will usually be the number of genes + 1

label_height

Percentage of the plot area that the headers should take up. Default = 25.

poly_type

Either "angle" or "square". Angle will scale the header bars to be equal width, with a layer of angled polygons connecting them to the data. Square will construct headers with rectangular bars that match the width of the samples in each group.