[R] How to change x axes' range

Yves Magliulo ym at climpact.com
Wed Dec 8 12:10:19 CET 2004


matplot(.., axes=FALSE)

then custozie by yourself ayour axes 

->axis(1,at=1:4,label=c("11 Vars","10 Vars","6Vars","4Vars"))

?axis and see label option for more details

HTH, 

Yves MAGLIULO, PARIS

Le mer 08/12/2004 à 11:36, Qin Liu a écrit :
> Hi, there:
> 
> When plot ann predicted results I need to indicate numbers of inputs for
> each column. 
> 
>         V1       V2         V3          V4
> 1  86.2700  49.9380  30.7630  0.1327
> 2  89.5127  55.9707  33.7683  0.1186
> 3  91.1833  58.4670  34.5610  0.1134
> 
> matplot(t, pch = 1:4, type = "o", col = rainbow(ncol(t)),xlab = "No. of
> inputs ",  ylab = "Mean of 6 Datasets", main = "xxxxxxxxxxx")
> 
> Instead of have typical x axes' range as "1, 2, 3, and 4" for each column, I
> need to indicate "11 Vars, 10 Vars, 6Vars, and 4Vars" or "A, B, C, and D"
> 
> Does anybody know anything about it? I appreciate if you could help me out.
> 
> Thank you very much indeed.
> 
> Qin
> 
> ______________________________________________
> 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