pd_base_figure: Create Base Figure

View source: R/S01-pd_functions.R

pd_base_figureR Documentation

Create Base Figure

Description

A function that generates a base figure, with optional guidelines, for a diagram.

Usage

pd_base_figure(
  default = NULL,
  width = 6,
  height = 6,
  orientation = "landscape",
  margin = rep(0.1, 4),
  guidelines = TRUE,
  guide_major = seq(0.1, 0.9, 0.1),
  guide_minor = seq(0.05, 0.95, 0.1),
  guide_adjust = 0.8,
  new = FALSE
)

Arguments

default

A character string used to specify pre-packaged figure sizes, including...

  • 'US letter' or '8.5 x 11' (inches);

  • '3.54 x 3.54' (inches);

  • '5 x 5' (inches);

  • '7.25 x 5' (inches).

width

A numeric value, the width of the figure in inches.

height

A numeric value, the height of the figure in inches.

orientation

A character string, indicates whether figures should be in 'landscape' or 'portrait' style.

margin

A numeric vector of 4 values, specifying in inches the margins for the bottom, left, top, and right, respectively.

guidelines

A logical value, if TRUE includes guidelines when generating the figure.

guide_major

A numeric vector giving the major guideline positions (values must be between 0 and 1).

guide_minor

A numeric vector giving the minor guideline positions (values must be between 0 and 1). If NULL, no minor guidelines are included.

guide_adjust

A numeric value, the adjustment controlling the position on the axes for the guideline numbers.

new

A logical value, if TRUE a new plotting window is generated.

Examples

## Not run: 
# Default (6 x 6 inches)
pd_base_figure()

# No guidelines
pd_base_figure( guidelines = FALSE )

# US letter size
pd_base_figure( default = 'US letter' )

# US letter (Portrait)
pd_base_figure( default = 'US letter', orientation = 'portrait' )

## End(Not run)


rettopnivek/pathdiagrams documentation built on Oct. 16, 2024, 2:52 p.m.