Scales: Scale constructors

ScalesR Documentation

Scale constructors

Description

Discrete scale constructors for geom_pedigreepoint

Usage

scale_feature.name_discrete(
  ...,
  set = "Set2",
  na.value = "grey50",
  main.feature.black = TRUE,
  name = "Features"
)

scale_feature.name(
  ...,
  set = "Set2",
  na.value = "grey50",
  main.feature.black = TRUE,
  name = "Features"
)

scale_feature.name_manual(
  ...,
  values = NULL,
  na.value = "grey50",
  main.feature.black = TRUE,
  name = "Features"
)

scale_sex_discrete(
  ...,
  values = c(22, 22, 22, 22, 21, 21, 21, 21, 0),
  breaks = c("1", "M", "Male", "male", "2", "F", "Female", "female", "3"),
  name = "Sex"
)

scale_sex(
  ...,
  values = c(22, 22, 22, 22, 21, 21, 21, 21, 0),
  breaks = c("1", "M", "Male", "male", "2", "F", "Female", "female", "3"),
  name = "Sex"
)

scale_isdead_discrete(
  ...,
  values = c(0, 0, 47, 47, 43, 63, 63),
  breaks = c("0", FALSE, "1", TRUE, "2", "Unknown", "NA"),
  name = "Status"
)

scale_isdead(
  ...,
  values = c(0, 0, 47, 47, 43, 63, 63),
  breaks = c("0", FALSE, "1", TRUE, "2", "Unknown", "NA"),
  name = "Status"
)

Arguments

...

Additional parameters passed on to discrete_scale.

set

A palette name from the lists in brewer.pal.

na.value

What aesthetic value should the missing values be displayed as?

main.feature.black

Should the main (first) feature always be displayed as black?

name

Legend title.

values

a set of aesthetic values to map data values to. The values will be matched in order (usually alphabetical) with the limits of the scale, or with breaks if provided. If this is a named vector, then the values will be matched based on the names instead. Data values that don't match will be given na.value.

breaks

One of:

  • NULL for no breaks

  • waiver() for the default breaks (the scale limits)

  • A character vector of breaks

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

value

For scale_feature.name_manual: The fill colours for the features.

Functions

  • scale_feature.name_discrete(): Scale constructor for the feature.name argument.

  • scale_feature.name(): Alias for scale_feature.name_discrete.

  • scale_feature.name_manual(): Manual scale constructor for the feature.name argument.

  • scale_sex_discrete(): Scale constructor for the sex argument.

  • scale_sex(): Alias for scale_sex_discrete.

  • scale_isdead_discrete(): Scale constructor for the isdead argument.

  • scale_isdead(): Alias for scale_isdead_discrete.


moritzlindner/ggped documentation built on Sept. 14, 2024, 12:14 p.m.