[R] Line spacing in graphics

Peter Langfelder peter.langfelder at gmail.com
Sat Feb 19 00:41:45 CET 2011


Hi all,

tried to google but found nothing, so here goes the question: is there
a way to control line spacing when displaying text in graphical mode
(for example, using text())?

As an example, run the following code:

plot(c(0,1), c(0,1), type = "n", axes = FALSE, xlab = "", ylab = "")
text(0.5, 0.5, "Line 1\nLine 2", cex = 3)

Is there a way to control the line spacing between the text lines
"Line 1" and "Line 2" in the resulting plot?

Thanks!

Peter



More information about the R-help mailing list