View source: R/textBoxPlacement.R
stagger | R Documentation |
unclutter the overlay plot by staggering the graphs
stagger(xList, yList, tList, sortB = FALSE, verbose)
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 |
tList |
list of character string texts to insert in plot |
sortB |
Boolean if TRUE staggered curves reordered, with largest range curve on bottom of graph |
verbose |
Boolean if TRUE print informative or diagnostic messages to console |
In order to unclutter the overlay plot, we need to stagger the graphs the offset for each graph will be the sum of the max values for all of the preceding graphs. So the stack of staggered graphs will have max y (ie, ymax) equal to the sum of the max's.
returns a list whose components are:
textBoxHeights return value of textBoxUserUnits()
permInd return value of permInd()
xlim numeric vector parameter for plot()
ylim numeric vector parameter for plot()
# demonstrate effect of sorting the curves
plot.new()
stagger(xList2,yList2,textList,sortB=FALSE,verbose=TRUE)
stagger(xList2,yList2,textList,sortB=TRUE,verbose=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.