[R] Positioning main title

ramonovelar ramon.ovelar at gmail.com
Tue Apr 24 16:28:06 CEST 2012


Hello,

I have a barplot where each row has quite long texts and I have used "par"
to make some room in the left:
par(mar=c(0, 17, 3, 0), oma=c(0, 0, 0, 0))
barplot2(prueba, main = l, col=colores, horiz=TRUE,las=1, cex.names=.7)

My problem is that main text appears justified to the plot. I want to put it
in the middle of the image, and find a way to sort it  out with mtex

par(mar=c(0, 17, 3, 0), oma=c(0, 0, 0, 0))
barplot2(prueba,  col=colores, horiz=TRUE,las=1, cex.names=.7)
mtext(l,side = 3, at = -70, line = 0.8)

But I will have to adjust this "at =-70" to his plot, depending on the
length of the title. I wonder if I can't find a way to place it in the
center.

Many thanks, R


--
View this message in context: http://r.789695.n4.nabble.com/Positioning-main-title-tp4583663p4583663.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list