Re: [R] Centering labels on X-axis

2012-10-21 Thread Jim Lemon
On 10/21/2012 09:03 AM, YAddo wrote: Thanks Jim and Rui. My apologies, i did not give enough info on my plot. I am using : plot(x,y) for a line plot. I want to center the labels on the x-axis for each tick. Hi YAddo, This is another guess, that you have more ticks than labels because they

Re: [R] Centering labels on X-axis

2012-10-20 Thread David Winsemius
On Oct 20, 2012, at 3:03 PM, YAddo wrote: > Thanks Jim and Rui. > > My apologies, i did not give enough info on my plot. Nor do you even now. Offer a data example. > > I am using : plot(x,y) for a line plot. I want to center the labels on the > x-axis for each tick. Code. We want code. -

Re: [R] Centering labels on X-axis

2012-10-20 Thread YAddo
Thanks Jim and Rui. My apologies, i did not give enough info on my plot. I am using : plot(x,y) for a line plot. I want to center the labels on the x-axis for each tick. Thanks. -- View this message in context: http://r.789695.n4.nabble.com/Centering-labels-on-X-axis-tp4646761p4646888.ht

Re: [R] Centering labels on X-axis

2012-10-20 Thread Jim Lemon
On 10/20/2012 01:39 AM, YAddo wrote: Dear all: I am trying to center labels on my plot with not much success. I have tried text(), mtext() but it's not working. I think I am using the wrong function for my task. Any help will be appreciated. My working codes. axis(1, at=c(1,2,3,4,5),font.lab

Re: [R] Centering labels on X-axis

2012-10-19 Thread Rui Barradas
Hello, Your working code needs a plot first: plot(1:5, xaxt = "n") And there's no 'text' argument to axis(). As for the centering of axis labels, they're centered on my graphics device. Exactly what is happening to yours? > sessionInfo() R version 2.15.1 (2012-06-22) Platform: i386-pc-mingw

[R] Centering labels on X-axis

2012-10-19 Thread YAddo
Dear all: I am trying to center labels on my plot with not much success. I have tried text(), mtext() but it's not working. I think I am using the wrong function for my task. Any help will be appreciated. My working codes. axis(1, at=c(1,2,3,4,5),font.lab=2,cex.axis=1.5,cex.lab=3,label=c("W0","