Learn R Programming

ChemoSpecUtils (version 1.0.5)

.ggAnnotate: Annotate a ggplot2 Plot with Text

Description

Internal function. General purpose function to add text to a ggplot2 plot. Uses textGrob so arguments like hjust can be passed via ...

Usage

.ggAnnotate(text, x, y, ...)

Value

A custom annotation grob, ready to be added to an existing plot.

Arguments

text

Character. The text to be plotted, but certain values are intercepted for special handling.

x

Numeric. The x coordinate for the text to be plotted, in NPC.

y

Numeric. The y coordinate for the text to be plotted, in NPC.

...

Additional arguments to be passed to textGrob.

Author

Bryan A. Hanson (DePauw University), Tejasvi Gupta.