Learn R Programming

edar (version 0.0.6)

ggsrc: Add source file label to a ggplot object

Description

Add a label with the current source file path and run time to a ggplot object.

Usage

ggsrc(plt, span = 2, size = 8, col = "grey55", lab = NULL, omit = "")

Value

A ggplot object with the added label.

Arguments

plt

A ggplot object.

span

<num> Number of lines: either 1 or 2.

size

<num> Text size.

col

<chr> Colour of the text.

lab

<chr> Custom label to use instead of the default.

omit

<chr> Text to omit from the label.

Examples

Run this code
p = mtcars |> ggxy(mpg,hp)
p |> ggsrc()
p |> ggsrc(lab="My label")

Run the code above in your browser using DataLab