[R] problem with putting text in outer margins (mtext outer=TRUE)

From: Janet Young <jayoung_at_fhcrc.org>
Date: Fri, 18 Jul 2008 16:00:12 -0700

Hi there,

I'm trying to get some text in the outer margins of my plots and am having trouble - the margin text is overlapping my plots, even though the outer margin I'm trying to put it in is very big.

I've simplified my problem down to this:


par(mfrow=c(6,1),oma=c(20,0,20,0), mar=c(0,3.1,1,2.1)) for (i in 1:6) {

mtext("Position (Mb)", outer=TRUE, side=1) mtext("Position (Mb)", outer=TRUE, side=3)

It's an ugly and meaningless set of plots, but you can see my problem: the two "Position" strings are right up against the plot, the bottom one even overlapping the bottom plot. Does anyone know how I can get the text to appear in the big white space of the outer margin, rather than right up against the plot?

thanks in advance,

Janet Young

PS I'm using R 2.7.1 Patched (2008-07-01 r46019) on an i686 linux machine. I have the same problem if I do this on Mac OS X R 2.7.1 (2008-06-23).

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sat 19 Jul 2008 - 01:21:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 19 Jul 2008 - 06:32:08 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive