R mtext


mtext() function writes in one of the four margins of the current figure region or one of the outer margins of the device region.

mtext(text, side = 3, line = 0, outer = FALSE, at = NA,
adj = NA, padj = NA, cex = NA, col = NA, font = NA, ...)

side: on which side of the plot (1=bottom, 2=left, 3=top, 4=right)
line: on which Margin line, starting at 0 counting outwards
outer: use outer margins if available
at: give location of each string in user coordinates. If the component of at corresponding to a particular text item is not a finite value (the default), the location will be determined by adj
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 If adj is not a finite value (the default), the value of par("las") determines the adjustment. For strings plotted parallel to the axis the default is to centre the string
padj: adjustment for each string perpendicular to the reading direction (which is controlled by adj). For strings parallel to the axes, padj = 0 means right or top alignment, and padj = 1 means left or bottom alignment If padj is not a finite value (the default), the value of par("las") determines the adjustment. For strings plotted perpendicular to the axis the default is to centre the string


> curve(5 * x ^ 3 - x ^ 2 + 4, -5, 8, col="blue", ylab="")
> mtext("y = 5x*3 - x^2 + 4 (line=0)", line=0)
> mtext("y = 5x*3 - x^2 + 4 (line=1)", line=1)
> mtext("y = 5x*3 - x^2 + 4 (line=2.5)", line=2.5, side=2)










convert.idontcarewhatyouthink.net © 2021  Terms of Use | Home