print.decorated_ggplot: Substitute Expressions, Titles, Labels and Aesthetics in...

View source: R/ggplot.R

print.decorated_ggplotR Documentation

Substitute Expressions, Titles, Labels and Aesthetics in ggplots

Description

Default labels (e.g. mappings for x, y, etc.) will be used to search data for more meaningful labels, taking first available from attributes with names in search. Likewise, if mappings for colour (color), fill, size, etc. (see defaults for discrete) indicate columns that have these defined as attributes, an attempt is made to add a corresponding discrete scale if one does not exist already. Values are recycled if necessary and are specific by ordinal position to the corresponding level of the corresponding variable. Levels are defined in increasing priority by sort(unique(x)), any guide attribute, any factor levels, or any codelist attribute.

Usage

## S3 method for class 'decorated_ggplot'
print(
  x,
  ...,
  search = getOption("yamlet_decorated_ggplot_search", c("expression", "title", "label")),
  discrete = getOption("yamlet_decorated_ggplot_discrete", c("colour", "fill", "size",
    "shape", "linetype", "alpha")),
  drop = getOption("yamlet_decorated_ggplot_drop", TRUE)
)

Arguments

x

class 'decorated_ggplot' from ggplot.decorated

...

ignored

search

attribute names from which to seek label substitutes

discrete

discrete aesthetics to map from data decorations where available

drop

should unused factor levels be omitted from data-driven discrete scales?

Value

see print.ggplot

See Also

Other decorated_ggplot: ggplot.decorated(), ggplot_build.decorated_ggplot()

Examples

example(ggplot.decorated)

yamlet documentation built on Oct. 6, 2023, 9:07 a.m.