add_lines: Add a lines look to a shape.

View source: R/add_look.R

add_linesR Documentation

Add a lines look to a shape.

Description

Add a lines look to a shape.

Usage

add_lines(
  pj,
  lc = "black",
  la = 0.5,
  lt = "-",
  lw = 1,
  shape = ".",
  name = "."
)

Arguments

pj

an object of class 'pj'.

lc

character vector containing valid color representations. Length must be consistent with the shape a line look is being added to.

la

proportion vector (i.e., between 0 and 1 inclusive) indicating the alpha opacity of the line color (0 = fully transparent, 0.5 = translucent, 1 = fully opaque).

lt

character vector indicating line type, where '-' indicates a solid line, ':' indicates a dotted line, '=' indicates a dashed line, ':=' indicates a dot-dash line, 'LD' indicates a long-width dashed line, and '2D' indicates a double-width dashed line.

lw

positive numeric vector indicating proportional line width relative to the default (i.e., 1 gives the default line width, 1/2 gives half the default line width, and 2 gives double the default line width.)

shape

character scalar indicating the type of shape to which the look will be applied.

Value

pj with the addition of the line look applied to the specified shape.

Argument recycling

For shapes that are polygons, the arguments lc, la, lt, and lw are recycled with the number of distinct polygons described by the shape to which the look is to be applied. For point shapes, these arguments are recycled with the number of defined points. For refline and segment shapes, the arguments must be recyclable with the number of lines/segments defined by the shape.

See Also

Other add_look: add_ci(), add_ends(), add_fills(), add_glyphs(), add_labels(), add_marks()


j-martineau/pj documentation built on March 19, 2022, 5:32 a.m.