nudge_venndir_label | R Documentation |
Nudge venndir labels
nudge_venndir_label(
venndir_output,
set = NULL,
x_offset = 0,
y_offset = 0,
offset_list = NULL,
align_y = c("none", "top", "middle", "bottom"),
align_x = c("none", "left", "center", "right"),
unit_type = c("relative", "absolute"),
label_location = "outside",
verbose = FALSE,
...
)
venndir_output |
output from |
set |
|
x_offset , y_offset |
|
offset_list |
|
align_y , align_x |
|
unit_type |
|
label_location |
|
verbose |
|
... |
additional arguments are ignored. |
Venndir labels are defined for each overlap polygon, with "inner"
and "outer" label coordinates for each polygon.
The show_labels
argument to venndir()
defines which labels
are placed inside and outside the Venn diagram polygons.
This function is useful to adjust the position of one or more
labels.
This function does not determine whether labels are displayed inside or outside the Venn polygons.
Venndir
object after adjusting label coordinates
Other venndir utility:
curate_venn_labels()
,
expand_range()
,
make_color_contrast()
,
make_venn_combn_df()
,
make_venn_test()
,
match_list()
,
modify_venndir_overlap()
,
plot,Venndir,ANY-method
,
print_color_df()
,
shrink_df()
,
three_point_angle()
,
venndir_legender()
,
venndir_to_df()
setlist1 <- make_venn_test(100, 3, do_signed=TRUE)
vo1 <- venndir(setlist1,
overlap_type="each",
return_items=TRUE,
label_style="lite_box",
main="Default venndir")
render_venndir(vo1)
head(vo1@label_df[, c("x", "x_offset", "y", "y_offset")], 3)
subset(vo1@label_df, overlap_set %in% "set_A")[, c("x", "x_offset", "y", "y_offset")]
vo2 <- nudge_venndir_label(vo1,
set=c("set_A", "set_B"),
x_offset=c(-0.1, 0.1),
y_offset=c(0))
render_venndir(vo2)
# alternative with offset_list
vo2b <- nudge_venndir_label(vo1,
offset_list=list(
set_A=c(0.1, 0),
set_B=c(0.1, 0),
set_C=c(0.4, 0.4)))
render_venndir(vo2b)
# now align two labels at the top
vo2c <- nudge_venndir_label(vo2b,
set=c("set_A", "set_B"),
align_y="top")
render_venndir(vo2c)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.