Description Usage Arguments Examples
View source: R/utility_functions.R
A function that, based on the x and y-axis boundaries, draws lines and labels for a specified set of axes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
xl |
a vector with the lower and upper boundaries for the x-axis. |
yl |
a vector with the lower and upper boundaries for the y-axis. |
pos |
a vector indicating at which sides an axis should be drawn. The possible sides are:
The number of elements in the vector tell the function how many axes to draw. |
lnSz |
the width of the axis lines. |
type |
the type of axis line to draw. |
label |
the labels for the axes. Must match the length of variable
|
lbPos |
the line positions of the labels for the axes. |
lbSz |
the font-size of the labels for the axes. |
inc |
the increments for the axis values. Must match the length of
the variable |
axisLabel |
An optional list matching in length to the variable
|
axSz |
the size of the font for the axis values. |
axPos |
the line position of the axes. |
prec |
the number of decimal values to report for the axis values. |
1 2 3 4 5 6 7 8 9 | layout( cbind( 1, 2 ) ) # 2 plotting panes
xl = c(0,1); yl = c(0,1); blankPlot(xl,yl) # Empty plot
customAxes( xl, yl, label = c( 'X', 'Y' ), lnSz = 2,
inc = c(.25,.25), axSz = .75 )
xl = c(.5,2.5); yl = c(-1,1); blankPlot(xl,yl); abline( h = 0 )
customAxes( xl, yl, pos = c(1,4), label = c( 'Conditions', 'Values' ),
lbSz = 1, lbPos = c(1,1),
axisLabel = list( list( c(1,2), c('A','B') ), NULL ),
inc = c(0,.5), axSz = .75 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.