Driver to compute x and y coordinates for placement of text box
based upon the values of the function
to avoid running into the graph line
and avoid overlapping with other overlay curves
returns a numeric vector c(yReal,yAdj) where xTry is an x value at which the text box will fit
without overlapping another overlay curve, or returns -1000000 for failure
Arguments
text
character string text to insert in plot
x
numeric vector of x values
y
numeric vector of y values
xPos
numeric x position for text box
nApprox
integer number of intervals to interpolate between x data points
xList
list whose components are numeric vectors of the x values for overlaid curves
yList
list whose components are numeric vectors of the y values for overlaid curves
stag
Boolean TRUE if this plot has staggering added to curves
offset
numeric vector of offsets added to each curve
verbose
Boolean if TRUE print informative or diagnostic messages to console