mfs_annotate_empty: Place an annotation on the least busy corner of a plot

Description Usage Arguments Examples

Description

This function returns a ggplot2 annotation grob for addition to an existing ggplot object. The annotation should have coordinates and text justification appropriate for placing it in the least crowded corner of the existing plot, based on x and y lists provided.

Usage

1
mfs_annotate_empty(s, xs, ys, opp = FALSE, text_color = "black")

Arguments

s

A text string for use as an annotation

xs

The list of x values used in the plot

ys

The list of y values used in the plot

opp

If True, indicates to put the annotation in the opposite corner of the least crowded

text_color

The color of the text

Examples

1
ggplot2(...) + mfs_annotate_empty("a comment", data[,"y"], data[,"x"])

mfschmidt/mfs.r.utils documentation built on May 29, 2019, 4:44 a.m.