Places labels near their anchors (x, y) but nudged apart so they do not
overlap each other or sit on the points, via repel_layout() (run in device
inches at draw time). Each displaced label is tied back to its anchor with a
roughened leader line. With boxed = TRUE the labels sit in roughened rounded
boxes (the geom_sketch_label_repel() look); otherwise they are bare text
(the geom_sketch_text_repel() look).
sketch_repel_grob(
x,
y,
label,
boxed = FALSE,
padding = 0.07,
corner_radius = 0.3,
box_padding = 0.1,
point_padding = 0.05,
min_segment = 0.06,
max_iter = 2000L,
roughness = 1,
bowing = 0.6,
n_passes = 2L,
seed = NULL,
text_gp = gpar(),
box_gp = gpar(),
seg_gp = gpar(),
name = NULL,
vp = NULL
)A SketchRepelGrob grob subclass.
Anchor points in npc [0,1] (vectors).
Character labels (recycled to the anchors).
Draw each label in a rounded box? Default FALSE.
Text-to-edge / text clearance, in inches. Default 0.07.
Box corner rounding (fraction of half-side). Default 0.3.
Extra clearance between boxes and around anchor points, in inches.
Shortest leader drawn, in inches (shorter = no leader).
Solver iteration cap. Default 2000.
Sketch parameters.
gpar()s for the text, the box, and the leader.
Passed to grid::gTree().
Other grob-layer:
sketch_arrow_grob(),
sketch_band_grob(),
sketch_callout_grob(),
sketch_dotplot_grob(),
sketch_ellipse_grob(),
sketch_engrave_grob(),
sketch_path_grob(),
sketch_polygon_grob(),
sketch_spray_grob(),
sketch_stroke_grob(),
sketch_wedge_grob()