Centralized configuration list used by all gg-based plotting functions. Returns a named list of default settings used by all gg-based plotting functions. This configuration can be overridden by supplying a list of key-value pairs to plotting functions such as `ggPedigree()`, `ggRelatednessMatrix()`, and `ggPhenotypeByDegree()`. Each key corresponds to a configurable plot, layout, or aesthetic behavior.
getDefaultPlotConfig(
function_name = "getDefaultPlotConfig",
personID = "personID",
status_column = NULL,
alpha_default = 1,
apply_default_scales = TRUE,
apply_default_theme = TRUE,
segment_default_color = "black",
color_theme = "color",
greyscale_palette_default = c("grey10", "grey50", "grey85"),
greyscale_low = "black",
greyscale_mid = "grey50",
greyscale_high = "white",
color_palette_default = c("#440154FF", "#7fd34e", "#f1e51d"),
color_palette_low = "#000004FF",
color_palette_mid = "#56106EFF",
color_palette_high = "#FCFDBFFF",
color_scale_midpoint = 0.5,
color_scale_theme = "ggthemes::calc",
alpha = alpha_default,
plot_title = NULL,
plot_subtitle = NULL,
value_rounding_digits = 5,
code_male = 1,
code_na = NA,
code_unknown = NULL,
code_female = 0,
label_include = TRUE,
label_column = "personID",
label_method = "geom_text",
label_max_overlaps = 25,
label_nudge_x = 0,
label_nudge_y = 0.15,
label_nudge_y_flip = TRUE,
label_segment_color = NA,
label_text_angle = 0,
label_text_size = 3,
label_text_color = "black",
label_text_family = "sans",
point_size = 6,
point_scale_by_pedigree = TRUE,
outline_include = FALSE,
outline_multiplier = 1.25,
outline_additional_size = 0,
outline_alpha = 1,
outline_color = "black",
tooltip_include = TRUE,
tooltip_columns = c("ID1", "ID2", "value"),
axis_x_label = NULL,
axis_y_label = NULL,
axis_text_angle_x = 90,
axis_text_angle_y = 0,
axis_text_size = 9,
axis_text_color = "black",
axis_text_family = "sans",
generation_height = 1,
generation_width = 1,
ped_packed = TRUE,
ped_align = TRUE,
ped_width = 15,
segment_linewidth = 0.8,
segment_linetype = 1,
segment_lineend = "round",
segment_linejoin = "round",
segment_scale_by_pedigree = FALSE,
segment_offspring_color = segment_default_color,
segment_parent_color = segment_default_color,
segment_self_color = segment_default_color,
segment_sibling_color = segment_default_color,
segment_spouse_color = segment_default_color,
segment_mz_color = segment_default_color,
segment_mz_linetype = segment_linetype,
segment_mz_alpha = 1,
segment_mz_t = 0.6,
segment_self_linetype = "dotdash",
segment_self_linewidth = 0.5 * segment_linewidth,
segment_self_alpha = 0.5,
segment_self_angle = 90,
segment_self_curvature = -0.2,
sex_color_include = TRUE,
sex_legend_title = "Sex",
sex_shape_labels = c("Female", "Male", "Unknown"),
sex_color_palette = color_palette_default,
sex_shape_female = 16,
sex_shape_male = 15,
sex_shape_unknown = 18,
sex_shape_values = NULL,
sex_shape_include = TRUE,
sex_legend_show = FALSE,
status_include = TRUE,
status_code_affected = 1,
status_code_unaffected = 0,
status_label_affected = "Affected",
status_label_unaffected = "Unaffected",
status_alpha_affected = 1,
status_alpha_unaffected = 0,
status_color_palette = c(color_palette_default[1], color_palette_default[2]),
status_color_affected = "black",
status_color_unaffected = color_palette_default[2],
status_shape_affected = 4,
status_legend_title = "Affected",
status_legend_show = FALSE,
overlay_shape = 4,
overlay_code_affected = 1,
overlay_code_unaffected = 0,
overlay_label_affected = "Affected",
overlay_label_unaffected = "Unaffected",
overlay_alpha_affected = 1,
overlay_alpha_unaffected = 0,
overlay_color = "black",
overlay_include = FALSE,
overlay_legend_title = "Overlay",
overlay_legend_show = FALSE,
focal_fill_include = FALSE,
focal_fill_legend_show = TRUE,
focal_fill_personID = 1,
focal_fill_legend_title = "Focal Fill",
focal_fill_high_color = "#FDE725FF",
focal_fill_mid_color = "#9F2A63FF",
focal_fill_low_color = "#0D082AFF",
focal_fill_scale_midpoint = color_scale_midpoint,
focal_fill_method = "gradient",
focal_fill_component = "additive",
focal_fill_n_breaks = NULL,
focal_fill_na_value = "black",
focal_fill_shape = 21,
focal_fill_force_zero = FALSE,
focal_fill_use_log = FALSE,
focal_fill_hue_range = c(0, 360),
focal_fill_chroma = 50,
focal_fill_lightness = 50,
focal_fill_hue_direction = "horizontal",
focal_fill_viridis_option = "D",
focal_fill_viridis_begin = 0,
focal_fill_viridis_end = 1,
focal_fill_viridis_direction = 1,
focal_fill_color_values = c("#052f60", "#e69f00", "#56b4e9", "#009e73", "#f0e442",
"#0072b2", "#d55e00", "#cc79a7"),
focal_fill_labels = c("Low", "Mid", "High"),
filter_n_pairs = 500,
filter_degree_min = 0,
filter_degree_max = 7,
drop_classic_kin = FALSE,
drop_non_classic_sibs = TRUE,
use_only_classic_kin = TRUE,
use_relative_degree = TRUE,
group_by_kin = TRUE,
match_threshold_percent = 10,
max_degree_levels = 12,
grouping_column = "mtdna_factor",
annotate_include = TRUE,
annotate_x_shift = -0.1,
annotate_y_shift = 0.005,
ci_include = TRUE,
ci_ribbon_alpha = 0.3,
tile_color_palette = c("white", "gold", "red"),
tile_interpolate = TRUE,
tile_color_border = NA,
tile_cluster = TRUE,
tile_geom = "geom_tile",
tile_na_rm = FALSE,
tile_linejoin = "mitre",
matrix_diagonal_include = TRUE,
matrix_upper_triangle_include = FALSE,
matrix_lower_triangle_include = TRUE,
matrix_sparse = FALSE,
matrix_isChild_method = "partialparent",
return_static = TRUE,
return_widget = FALSE,
return_interactive = FALSE,
return_mid_parent = FALSE,
hints = NULL,
relation = NULL,
debug = FALSE,
override_many2many = FALSE,
optimize_plotly = TRUE,
recode_missing_ids = TRUE,
recode_missing_sex = TRUE,
add_phantoms = FALSE,
...
)A named list of default plotting and layout parameters.
The name of the function calling this configuration.
The column name for person identifiers in the data.
The column name for affected status in the data.
Default alpha transparency level.
Whether to apply default color scales.
Whether to apply default ggplot2 theme.
A character string for the default color of segments in the plot.
Theme mode controlling default palettes. Options: "color" (default) or "greyscale".
Default discrete greyscale palette used when color_theme="greyscale".
Greyscale low color for continuous gradients when color_theme="greyscale".
Greyscale midpoint color for continuous gradients when color_theme="greyscale".
Greyscale high color for continuous gradients when color_theme="greyscale".
A character vector of default colors for the plot.
Color for the low end of a gradient.
Color for the midpoint of a gradient.
Color for the high end of a gradient.
Midpoint value for continuous color scales.
Name of the color scale used (e.g., "ggthemes::calc").
Default alpha transparency for plot elements.
Main title of the plot.
Subtitle of the plot.
Number of digits to round displayed values.
Integer/string code for males in data. Default is 1.
optional Integer/string code for missing values in data. Default is NA.
optional Integer/string code for unknown sex in data. Default is NULL.
optional Integer/string code for females in data. Default is 0.
Whether to display labels on plot points.
Column to use for text labels.
Method used for labeling (e.g., ggrepel, geom_text).
Maximum number of overlapping labels.
Horizontal nudge for label text.
Vertical nudge for label text.
TRUE. Whether to flip the nudge y value to be negative. The plot is reversed vertically, so this is needed to nudge labels up instead of down.
Segment color for label connectors.
Text angle for labels.
Font size for labels.
Color of the label text.
Font family for label text.
Size of points drawn in plot.
Whether to scale point sizes by pedigree size.
Whether to include outlines around points.
Multiplier to compute outline size from point size.
Additional size added to outlines.
Alpha transparency for point outlines.
Color used for point outlines.
Whether tooltips are shown in interactive plots.
Columns to include in tooltips.
Label for the X-axis.
Label for the Y-axis.
Angle of X-axis text.
Angle of Y-axis text.
Font size of axis text.
Color of axis text.
Font family for axis text.
Vertical spacing of generations.
Horizontal spacing of generations.
Whether the pedigree should use packed layout.
Whether to align pedigree generations.
Plot width of the pedigree block.
Line width for segments. Default is 0.80.
Line type for segments. Default is 1 (solid).
Line end type for segments. Default is "round".
Line join type for segments. Default is "round".
Whether to scale segment sizes by pedigree size. Default is FALSE.
Color for offspring segments. Default uses segment_default_color.
Color for parent segments. Default uses segment_default_color.
Color for self-loop segments. Default uses segment_default_color.
Color for sibling segments. Default uses segment_default_color.
Color for spouse segments. Default uses segment_default_color.
Color for monozygotic twin segments. Default uses segment_default_color.
Line type for MZ segments. Default uses segment_linetype.
Alpha for MZ segments. Default is 1.
Tuning parameter for MZ segment layout. Default is 0.6.
Line type for self-loop segments. Default is "dotdash".
Width of self-loop segment lines. Default is half of segment_linewidth.
Alpha value for self-loop segments. Default is 0.5.
Angle of self-loop segment. Default is 90 degrees.
Curvature of self-loop segment. Default is -0.2.
Whether to color nodes by sex. Default is TRUE.
Title of the sex legend.
Labels used in sex legend.
A character vector of colors for sex. Default uses color_palette_default.
Shape for female nodes. Default is 16 (circle).
Shape for male nodes. Default is 15 (square).
Shape for unknown sex nodes. Default is 18 (diamond).
A named vector mapping sex codes to shapes.
Whether to display the shape for sex variables
Whether to display sex in the legend or not.
Whether to display affected status.
Value that encodes affected status.
Value that encodes unaffected status.
Label for affected status.
Label for unaffected status.
Alpha for affected individuals.
Alpha for unaffected individuals. Default is 0 (transparent).
A character vector of colors for affected status.
Color for affected individuals.
Color for unaffected individuals.
Shape for affected individuals.
Title of the status legend.
Whether to show the status legend.
Shape used for overlaying points in the plot. Default is 4 (cross).
Code for affected individuals in overlay. Default is 1.
Code for unaffected individuals in overlay. Default is 0.
Label for affected individuals in overlay. Default is "Affected".
Label for unaffected individuals in overlay. Default is "Unaffected".
Alpha for affected individuals in overlay. Default is 1.
Alpha for unaffected individuals in overlay. Default is 0.
Color for overlay points. Default is "black".
Whether to include overlay points in the plot. Default is FALSE.
Title of the overlay legend. Default is "Overlay".
Whether to show the overlay legend. Default is FALSE.
Whether to fill focal individuals. Default is FALSE.
Whether to show legend for focal fill. Default is TRUE.
ID of focal individual. Default is 1.
Title of focal fill legend.
High-end color for focal gradient.
Midpoint color for focal gradient.
Low-end color for focal gradient.
Midpoint for focal fill scale. Default uses color_scale_midpoint.
Method used for focal fill gradient. Options are 'steps', 'steps2', 'step', 'step2', 'viridis_c', 'viridis_d', 'viridis_b', 'manual', 'hue', 'gradient2', 'gradient'.
Component type for focal fill.
Number of breaks in focal fill scale.
Color for NA values in focal fill.
Shape used for focal fill points.
Whether to force zero to NA in focal fill.
Whether to use log scale for focal fill.
Hue range for focal fill colors.
Chroma value for focal fill colors.
Lightness value for focal fill colors.
Direction of focal fill gradient.
Option for viridis color scale.
Start of viridis color scale.
End of viridis color scale.
Direction of viridis color scale (1 for left to right, -1 for right to left).
A character vector of colors for focal fill.
Labels for focal fill colors.
Threshold to filter maximum number of pairs.
Minimum degree value used in filtering.
Maximum degree value used in filtering.
Whether to exclude classic kin categories.
Whether to exclude non-classic sibs.
Whether to restrict analysis to classic kinship.
Whether to use relative degrees instead of absolute.
Whether to group output by kinship group.
Kinbin matching threshold as a percentage.
Maximum number of degree levels to show.
Name of column used for grouping.
Whether to include annotations.
Horizontal shift applied to annotation text.
Vertical shift applied to annotation text.
Whether to show confidence intervals.
Alpha level for CI ribbons.
Color palette for matrix plots. Default is c("white", "gold", "red").
Whether to interpolate colors in matrix tiles.
Color border for matrix tiles. Default is NA (no border).
Whether to sort by clusters the matrix.
Geometry type for matrix tiles (e.g., "geom_tile", "geom_raster").
Whether to remove NA values in matrix tiles. Default is FALSE.
Line join type for matrix tiles. Default is "mitre".
Whether to include diagonal in matrix plots. Default is TRUE.
Whether to include upper triangle in matrix plots.
Whether to include lower triangle in matrix plots.
Whether matrix input is sparse.
Method used for isChild matrix derivation. Options are "partialparent", "fullparent", "anyparent".
Whether to return a static plot.
Whether to return a widget object.
Whether to return an interactive plot.
Whether to return mid_parent values in the plot.
Optional hints to pass along to kinship2::autohint
Optional relation to pass along to kinship2::pedigree
Whether to enable debugging mode.
Whether to override many-to-many link logic.
Whether to optimize the plotly output for speed.
Whether to recode 0s as missing IDs in the pedigree. Default is TRUE.
Whether to recode missing sex codes in the pedigree. Default is TRUE.
Whether to add phantom parents for individuals without parents.
Additional arguments for future extensibility.
buildPlotConfig, vignette("v10_configuration")