scale_adjusted: Common scale adjustments for DAGs

View source: R/themes.R

scale_adjustedR Documentation

Common scale adjustments for DAGs

Description

scale_adjusted() is a convenience function that implements ways of visualizing adjustment for a variable. By convention, a square shape is used to indicate adjustment and a circle when not adjusted. Arrows out of adjusted variables are often eliminated or de-emphasized, and scale_adjusted() uses a lower alpha for these arrows. When adjusting a collider, a dashed line is sometimes used to demarcate opened pathways, and scale_adjusted() does this whenever geom_dag_collider_edges() is used. scale_dag() is deprecated in favor of scale_adjusted().

Usage

scale_adjusted(include_alpha = FALSE)

scale_dag(breaks = ggplot2::waiver())

Arguments

include_alpha

Logical. Include alpha-related scales?

breaks

One of:

  • NULL for no breaks

  • waiver() for the default breaks computed by the transformation object

  • A numeric vector of positions

  • A function that takes the limits as input and returns breaks as output


malcolmbarrett/ggdag documentation built on March 8, 2024, 5:49 p.m.