In the attached plot, how do I move just the X-label(Time) to the right. Basically, I just want to do a par ( adj = 1) on just the X-label, not all my labels. Any ideas how to accomplish this? Thanks, Tony Tony Vargas Cisco Systems Engineering Computing Services (408) 525-4113 tvargas at cisco.com -------------- next part -------------- my.yugo.Apr.2003.other.info <- read.table(file="/auto/solperf/tgu/ActiveParsedFiles/yugo/Apr.2003/other.info", sep="=", header=TRUE) names(my.yugo.Apr.2003.other.info) attach(my.yugo.Apr.2003.other.info) bitmap("foo8.bmp",type = "png256", height = 4, width = 4,) par( omi = c(.5,.1,0,0)) plot(total.views, xlab = "Time", ylab = "Total number of views", main = "yugo's Total number of views Apr.2003", type="l", col="red", xaxt = "n", cex.axis = 1.5, cex.main = 1.25, cex.lab = 1.25) temp <- seq(1, length(Time), by = 144) axis(1, at = temp, labels = as.character(Time[temp]), las = 3, cex.axis = 1.5) quit()
Use the title() function to write the x label. plot(1,1,xlab="") title(xlab="my x label name", adj=1) Jerome On April 7, 2003 12:01 pm, Tony Vargas wrote:> In the attached plot, how do I move just the X-label(Time) to the right. > Basically, I just want to do a par ( adj = 1) on just the X-label, not > all my labels. Any ideas how to accomplish this? > > Thanks, > > Tony > > Tony Vargas > Cisco Systems > Engineering Computing Services > (408) 525-4113 > tvargas at cisco.com > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Worked great . . . thanks for your help. Tony Tony Vargas Cisco Systems Engineering Computing Services (408) 525-4113 tvargas at cisco.com On Mon, 7 Apr 2003, Jerome Asselin wrote:> > Use the title() function to write the x label. > > plot(1,1,xlab="") > title(xlab="my x label name", adj=1) > > Jerome > > On April 7, 2003 12:01 pm, Tony Vargas wrote: > > In the attached plot, how do I move just the X-label(Time) to the right. > > Basically, I just want to do a par ( adj = 1) on just the X-label, not > > all my labels. Any ideas how to accomplish this? > > > > Thanks, > > > > Tony > > > > Tony Vargas > > Cisco Systems > > Engineering Computing Services > > (408) 525-4113 > > tvargas at cisco.com > > ______________________________________________ > > R-help at stat.math.ethz.ch mailing list > > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > >
Without trying to look at the attachment ... I think that title(xlab= ) does NOT have the flexibility you want, but mtext("Time", side=1, line=2, at=range(x)[2], adj=1) might be enough to plug the new label in wherever you want it. If you're using some version of the basic plot() function to create the plot in the first place, use argument xlab="" to suppress the automatic axis label in the center of the axis. See help("mtext"), help("title"), etc. - tom blackwell - u michigan medical school - ann arbor - On Mon, 7 Apr 2003, Tony Vargas wrote:> In the attached plot, how do I move just the X-label(Time) to the right. > Basically, I just want to do a par ( adj = 1) on just the X-label, not > all my labels. Any ideas how to accomplish this? > > Thanks, Tony > > Tony Vargas > Cisco Systems > Engineering Computing Services > (408) 525-4113 > tvargas at cisco.com >
Hi Tony Vargas wrote:> In the attached plot, how do I move just the X-label(Time) to the right. > Basically, I just want to do a par ( adj = 1) on just the X-label, not > all my labels. Any ideas how to accomplish this?I can't replicate your plot exactly because I don't have your data, but the following may help [draw the X-label in a separate call to title()]: par( omi = c(.5,.1,0,0)) plot(1:10, xlab = "", ylab = "Total number of views", main = "yugo's Total number of views Apr.2003", type="l", col="red", xaxt = "n", cex.axis = 1.5, cex.main = 1.25, cex.lab = 1.25) temp <- 1:10 axis(1, at = temp, labels = temp, las = 3, cex.axis = 1.5) title(xlab="Time", adj=1, cex.lab=1.25) Paul -- Dr Paul Murrell Department of Statistics The University of Auckland Private Bag 92019 Auckland New Zealand 64 9 3737599 x85392 paul at stat.auckland.ac.nz