Learn R Programming

ggspectra (version 0.3.13)

axis_labels_uk: Default text for axis labels

Description

Texts used by default for axis labels in plots are recalled from character vectors returned by these functions. The aim is that their default values can be easily changed or translated to other languages. They contain only the text part, but not symbols or units of expression.

Usage

axis_labels_uk(append = "", sep = "")

axis_labels_uk_comma()

axis_labels_none()

axis_labels()

Value

A character vector

Arguments

append

character The string to be appended to each label,

sep

character Passed to function paste as argument for parameter sep.

Details

By default axis_labels() contains a copy of axis_labels_uk_comma(). By assigning to this name a user function that returns a named character vector using the same names as those returned by these functions, it is possible to temporarily change the default texts.

Currently only UK English label texts are predefined and axis_labels() is a synonym of axis_labels_uk().

Examples

Run this code
axis_labels()[["w.length"]] # ending in a comma
axis_labels_uk()[["w.length"]] # no comma
axis_labels_none()[["w.length"]] # empty label

Run the code above in your browser using DataLab