Re: [R] x axis

From: Yves Magliulo <ym_at_climpact.com>
Date: Tue 18 Oct 2005 - 00:48:01 EST

hi,

first shut down automatic axis in plot with
>plot( ...,axes=F)

then
customize your axis with
?axis
 axis(side, at = NULL, labels = TRUE, tick = TRUE, line = NA,

          pos = NA, outer = FALSE, font = NA, vfont = NULL,
          lty = "solid", lwd = 1, col = NULL, padj = NA, ...)

you can specify what ever you want
in your case :
side=1 for x axis
at=c(0,6,12,18,24)
labels=c(0,6,12,18,24)

other way to do this with ?par : see parameters xaxp, xaxs, xaxt

best,

yves.
Le lun 17/10/2005 à 16:17, Michela Ballardini a écrit :

> Hello,
> I write to know how can I modify the x axis : when I plot a survival object, R plots a graph with x values = 0, 10, 20, 30 while I want a graph with values 0, 6, 12, 18, 24 in the x axis. How can I do this? In R 2.1.1 version there was "time.inc" in survplot, but in version R 2.2.0 there isn't it!
>
> I am sorry for my english and I hope that you understand my problem.
>
> Thank you
> Mic
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Oct 18 01:02:07 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 19:00:31 EST