[R] Varying x-axes ticks

XIAO LIU xiaoliu at jhmi.edu
Fri Dec 31 00:25:30 CET 2004


 x <- c(0:24, (25:104-24)/(104-24)*25+24)
y <- 0.5*(104-104:0)/104
plot(x,y, xaxt = "n")
 axis(1, at = 0:49, labels = c(0:24, (25:49-24)*(104-24)/25+24))


----- Original Message -----
From: Anthony Gichangi <anthony at stat.sdu.dk>
Date: Tuesday, December 28, 2004 12:57 pm
Subject: [R] Varying  x-axes ticks

> Dear R Users,
> I have the following situations to plot. 
> 
> x-values (times)      :  range from 0 to 104           (in weeks)
> y-values (hazards)  :  range from 0 to  0.5
> 
> Now I want to make a plot of time versus hazards such
> that  in the time axis (i.e x-axis) the values 0-24 occupies
> half of the axis and the values 25-104 ocupies the rest
> of the axis. 
> 
> In other words I want to emphasize on first 24 weeks so that
> the features of the hazard are more pronounced for these 
> values.
> 
> Anybody with ideas how I can accomplish this ?
> 
> 
> Thanks in advance
> 
> 
> With kind regards
> 
> Anthony
> 
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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




More information about the R-help mailing list