Finer control over label drawing for taxatree_plotkey
(with .draw_label = FALSE),
and label drawing for taxatree_plots
output too.
taxatree_plot_labels(
p,
circular = TRUE,
taxon_renamer = identity,
fun = ggrepel::geom_text_repel,
label_var = "label",
x_nudge = 0.1,
y_nudge = 0.025,
rotate = 0,
fontface = "bold",
size = 2.5,
colour = "grey15",
max.overlaps = Inf,
min.segment.length = 0,
segment.size = 0.15,
segment.color = "grey15",
point.padding = 0.05,
box.padding = 0.1,
seed = NA,
...
)
taxatree_plotkey or taxatree_plots output plot
is the plot layout circular? labels are drawn differently for circular trees
function that takes taxon names and returns modified names for labels
ggrepel labelling function: geom_text_repel or geom_label_repel
name of variable in taxatree_stats that indicates which taxa to label
absolute amount by which the initial position of taxon labels is nudged (relevant only for circular layouts, use nudge_x for other layouts)
absolute amount by which the initial position of taxon labels is nudged (relevant only for circular layouts, use nudge_y for other layouts)
angle to rotate labels' outer edges away from horizontal (relevant only for circular layouts, use angle for other layouts)
fontface of label text
size of labels
colour of label outlines and text
max number of overlapping labels tolerated
min length of label line segment to bother drawing
thickness of line segment
colour of line segment
padding around node points (for label positioning)
padding around labels/text (for label positioning)
set this for reproducible label positions
Arguments passed on to ggrepel::geom_text_repel
arrow
specification for arrow heads, as created by arrow
force
Force of repulsion between overlapping text labels. Defaults to 1.
force_pull
Force of attraction between a text label and its corresponding data point. Defaults to 1.
max.time
Maximum number of seconds to try to resolve overlaps. Defaults to 0.5.
max.iter
Maximum number of iterations to try to resolve overlaps. Defaults to 10000.
xlim,ylim
Limits for the x and y axes. Text labels will be constrained to these limits. By default, text labels are constrained to the entire plot area.
direction
"both", "x", or "y" – direction in which to adjust position of labels
verbose
If TRUE
, some diagnostics of the repel algorithm are printed