Set, get, and reset global default options for DAG appearance. These options
are used as defaults by all geom_dag(), ggdag_*(), and related functions.
Usage
ggdag_defaults
ggdag_options_set(...)
ggdag_options_get(name = NULL)
ggdag_options_reset()
ggdag_option(name, default)
ggdag_option_proportional(name, base_default, override_default)Arguments
- ...
Named option values to set. See
ggdag_defaultsfor valid names and types.- name
Character string. The option name (without the
ggdag.prefix). IfNULL, returns all currently-set ggdag options.- default
Default value to return if the option is not set.
- base_default
The base default for this option (e.g., 8 for edge_cap).
- override_default
The override default used by certain functions (e.g., 10 for edge_cap in adjustment set functions).
Value
ggdag_options_set(): Invisibly returns a named list of the previous option values.ggdag_options_get(): The option value, or a named list of all set options ifnameisNULL.ggdag_options_reset(): Called for its side effect; returnsNULLinvisibly.ggdag_option(): The option value if set, otherwisedefault.ggdag_option_proportional(): The scaled option value if set, otherwiseoverride_default.
Details
Options are stored in R's global options() as ggdag.<name>. When an
option is NULL (the default), each function uses its own built-in
default. Setting a global option overrides the built-in default for all
functions that use it.
Functions that normally use edge_cap = 10 (e.g., ggdag_adjustment_set(),
ggdag_drelationship()) maintain a proportional offset. If you set
ggdag.edge_cap to a custom value, these functions scale it by 10/8.
