Henry
2012-Feb-05 21:23 UTC
[R] text command - how to get a white background to cover grid lines
New to R - rookie question. I'm a mechanical engineer and enjoying using R to make high quality graphs. I've searched. I want to put text notation on graph plot areas and have the text background "box" white to cover over the grid lines. my command so far.... text(15,5200,"Air Flow",cex=.8,col="blue", background="white") # this doesn't work... I've tried bg="white", background color="white" and a number of other attempts. The text is getting placed on the chart where I want it. Thanks, -Henry -- View this message in context: http://r.789695.n4.nabble.com/text-command-how-to-get-a-white-background-to-cover-grid-lines-tp4359826p4359826.html Sent from the R help mailing list archive at Nabble.com.
Pete Brecknock
2012-Feb-05 21:33 UTC
[R] text command - how to get a white background to cover grid lines
How about using the legend function ... plot(rnorm(100)) legend(60,2,"100 Random Normal Draws",cex=.8,text.col="blue", box.col="red",bg="yellow") You can customize my effort to fit your specific needs HTH Pete Henry wrote> > New to R - rookie question. > I'm a mechanical engineer and enjoying using R to make high quality > graphs. > > I've searched. > > I want to put text notation on graph plot areas and have the text > background "box" white to cover over the grid lines. > > my command so far.... > text(15,5200,"Air Flow",cex=.8,col="blue", background="white") # this > doesn't work... > > I've tried bg="white", background color="white" and a number of other > attempts. > > The text is getting placed on the chart where I want it. > > Thanks, > -Henry >-- View this message in context: http://r.789695.n4.nabble.com/text-command-how-to-get-a-white-background-to-cover-grid-lines-tp4359826p4359840.html Sent from the R help mailing list archive at Nabble.com.
Jim Lemon
2012-Feb-06 08:19 UTC
[R] text command - how to get a white background to cover grid lines
On 02/06/2012 08:23 AM, Henry wrote:> New to R - rookie question. > I'm a mechanical engineer and enjoying using R to make high quality graphs. > > I've searched. > > I want to put text notation on graph plot areas and have the text background > "box" white to cover over the grid lines. > > my command so far.... > text(15,5200,"Air Flow",cex=.8,col="blue", background="white") # this > doesn't work... > > I've tried bg="white", background color="white" and a number of other > attempts. > > The text is getting placed on the chart where I want it. >Hi Henry, have a look at the boxed.labels function in the plotrix package. Jim