Learn R Programming

ggsketch (version 2.0.0)

paper_primitives: Build the vector primitives for a paper ground

Description

Turns a paper_spec() into draw-ready primitives in npc coordinates, spaced for the given physical panel size. The grob layer (element_sketch_paper()) renders the result; this function stays free of any grid dependency.

Usage

paper_primitives(kind, width_in = 6, height_in = 4, seed = NULL)

Value

A list with ground (fill colour) and zero or more of segs (a list of homogeneous line groups, each list(x0, y0, x1, y1, colour, lwd)), dots (list(x, y, r_in, colour)), and blotches (a list of list(x, y, fill) polygons), or NULL for "none".

Arguments

kind

A value from sketch_papers().

width_in, height_in

Panel size in inches (sets the ruling pitch).

seed

Integer seed (for aged blotches).

See Also

Other sketch-paper: element_sketch_paper(), paper_grain(), paper_spec(), sketch_papers()