Adds a new named blueprint to the package's internal variant registry so it
can be referenced by variant arguments in geom_colon(),
geom_colon_label(), colon_sf(), and colon_heatmap_grid().
register_colon_variant(name, data)A non-empty character string naming the new variant.
Existing variants (including "standard" and "sescd") will be
overwritten if the same name is supplied.
A data frame with at least three columns:
dxNumeric. Relative x-coordinate of each polygon vertex.
dyNumeric. Relative y-coordinate of each polygon vertex.
partCharacter. Segment name each vertex belongs to.
Each unique part value must have at least 3 rows (minimum for a polygon).
The name string, invisibly.
my_blueprint <- data.frame(
dx = c(0, 1, 1, 0, 2, 3, 3, 2),
dy = c(0, 0, 1, 1, 0, 0, 1, 1),
part = c(rep("SegA", 4), rep("SegB", 4))
)
register_colon_variant("my_colon", my_blueprint)
list_colon_variants()
#> [1] "standard" "sescd" "my_colon"