axis_text | R Documentation |
A wrapper function for mtext
with two changes.
1. The default for text
and at
is now NULL
. If both are NULL
, axTicks
will be used to determine what values to include on the x (side = 1
) or y (side = 2
) axis.
2. If length(text) == 1
and at = NULL
, then the appropriate side
will find the central point of the axis to put the text (e.g., for an axis title).
axis_text( text = NULL, labels = FALSE, side = 3, line = 0, outer = FALSE, at = NULL, adj = NA, padj = NA, cex = NA, col = NA, font = NA, ... )
text |
a character or expression vector specifying the text to be written. See |
labels |
Set to |
side |
an integer specifying which side of the plot the axis is to be drawn on. The axis is placed as follows: 1=below, 2=left, 3=above and 4=right. |
line |
on which MARgin line, starting at 0 counting outwards. |
outer |
use outer margins if available. |
at |
The location of each string in user coordinates (i.e., the text). See |
adj |
adjustment for each string in reading direction. For strings parallel to the axes, adj = 0 means left or bottom alignment, and adj = 1 means right or top alignment. See |
padj |
adjustment for each string perpendicular to the reading direction (which is controlled by |
cex |
character expansion factor. Can be a vector. |
col |
color to use. Can be a vector. |
font |
font for text. Can be a vector. |
... |
Other graphical parameters that may apply to |
## Not run: blank( xlim = c(0,50), ylim = c(0,100), bty ="l" ) axis_blank(1, at = seq(0,50,10)) axis_text(side = 1) axis_blank(2, at = seq(0,100,20)) axis_text(side = 2) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.