Learn R Programming

SMITE (version 1.0.2)

addShadowText: Add shadow text (a second color bordering the text) to a plot

Description

This is a usefule function to help text stand out on busy backgrounds like gene networks

Usage

addShadowText(x, y = NULL, labels, col = "white", bg = "black", theta = seq(pi/4, 2 * pi, length.out = 8), r = 0.1, ...)

Arguments

x
A numeric vector of x coordinates
y
A numeric vector of y coordinates
labels
A character vector to be plotted at the specified coordinates
col
The text color
bg
The color of the outline
theta
The number of shadows to plot
r
The radius for the shadows
...
Additional plotting arguments

Value

Adds shadow text to plot

Details

The function creates its effect by plotting theta shadows at r radius around the text to create the illusion of a text shadow

References

http://article.gmane.org/gmane.comp.lang.r.general/147787

See Also

text, mtext

Examples

Run this code
plot.new()

addShadowText(x = .5,y = .5,"TEST",col="white",bg="gray")


Run the code above in your browser using DataLab