Skip to contents

This is useful for adding text to busy plots, as the altitude labels in skew-T diagrams created with plot.sounding().

Usage

textInBox(x, y, labels, font = 1, cex = 1, col = 1, bg = "white")

Arguments

x, y, labels, font, cex, col

as for text().

bg

colour for the box underlay.

Author

Dan Kelley

Examples

plot(c(1, 2), c(10, 20), bg = "gray", type = "n")
rect(xleft = 0, xright = 3, ybottom = 5, ytop = 25, col = "gray")
abline(h = 15)
abline(v = 1.5)
textInBox(1.5, 15, "12345 m")