labs {ggplot2} R Documentation

Modify axis, legend, and plot labels

Description

<br /> Good labels are critical for making your plots accessible to <br /> a wider audience. Always ensure the axis and legend labels <br /> display the full variable name. Use the plot title and subtitle <br /> to explain the main findings. It's common to use the caption <br /> to provide information about the data source. tag can be used <br /> for adding identification tags to differentiate between multiple <br /> plots.

Usage

labs(
    x = NULL,
    y = NULL,
    title = NULL,
    subtitle = NULL,
    caption = NULL,
    tag = NULL,
    alt = NULL,
    alt.insight = NULL,
    ... = NULL);

Arguments

x

[as string]

y

[as string]

title

The text for the title. [as string]

subtitle

The text For the subtitle For the plot which will be displayed below the title. [as string]

caption

The text for the caption which will be displayed in the bottom-right of the plot by default. [as string]

tag

The text for the tag label which will be displayed at the top-left of the plot by default.

alt

Text used for the generation of alt-text for the plot. See get_alt_text for examples.

alt.insight

-

args

A list of new name-value pairs. The name should be an aesthetic. [as list]

Details

You can also set axis and legend labels in the individual scales (using the first argument, the name). If you're changing other scale options, this is recommended.

If a plot already has a title, subtitle, caption, etc., And you want To remove it, you can Do so by setting the respective argument To NULL. For example, If plot p has a subtitle, Then p + labs(subtitle = NULL) will remove the subtitle from the plot.

Authors

SMRUCC genomics institute

Value

this function returns data object of type ggplotOption.

clr value class

Examples


[Package ggplot2 version 1.0.0.0 Index]