-2
I need to plot a legend that has a very large text. But the problem is that when I export the R figure, part of the text is outside the Plot area. I wonder if there is a way I break the text of the legend in two parts, so that it fits in the area of Plot.
What do I have:
texto1 <- "Esse texto é muito grande e portanto precisa ser quebrado em duas partes"
texto2 <- "Esse texto também é muito grande e precisa ser quebrado em duas partes"
plot(NULL, xaxt="n", yaxt="n", bty="n", ylab="", xlab="", xlim=0:1, ylim=0:1)
legend("center", legend = c(texto1,texto2), pch=15, pt.cex=3, cex=1.1, bty="n",
col = c("red", "blue"), y.intersp =1.5)
You tried to use a line break
\n
?– Lucas
@Lucas had never used this line break. But she does exactly what I need. Thank you!
– ALS.Meyer