Skip to contents

vl_pattern() is vellum::vl_pattern(), re-exported, for building a pattern fill from an arbitrary tile grob when the ready-made pattern_stripe() family does not fit. Like a gradient, the result (a vellum_pattern object) is an unscaled fill value. It takes the tile grob, the tile width / height and anchor x / y in units, and extend; see vellum::vl_pattern() for the full reference.

Examples

dots <- vellum::circle_grob(r = 0.25, gp = vellum::vl_gpar(fill = "grey30"))
vl_pattern(dots, width = 0.08, height = 0.08)
#> <vellum_pattern> cell 0.08 x 0.08 "npc", extend = "repeat"