[R] R: Graph with values of coordinates of points in x axis

From: Guazzetti Stefano <Stefano.Guazzetti_at_ausl.re.it>
Date: Wed 15 Jun 2005 - 18:44:03 EST


try:
 plot(x, y, type="l", xlab="Months",

      xaxt="n", ylab="Y values")
 axis(1, at=0:5*6)

Stefano

>-----Messaggio originale-----
>Da: r-help-bounces@stat.math.ethz.ch
>[mailto:r-help-bounces@stat.math.ethz.ch]Per conto di Massimiliano
>Tripoli
>Inviato: mercoledý 15 giugno 2005 10.35
>A: r-help@stat.math.ethz.ch
>Oggetto: [R] Graph with values of coordinates of points in x axis
>
>
>Hi all,
>
>I want to draw a line with the values of x marked in X axis.
>
>I tried with
>x <- c(0,6,12,18,24,30) #coordinates of points x
>y <- c(2,5,7,5,7,16) #coordinates of points y
>plot(x,type="n",xlab="Months",main="main",ylim=c(0,16),xlim=c(0,30))
>lines(x,y)
>
>The graph shows by default an increment of the sequence in
>x axis that I'm
>not able to change.
>I'would like to have 0,6,12,18,24,30 and not 0,10,15,20,25,30.
>Any hint is appreciated.
>
>Thanks in advance.
>
>______________________________________________
>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



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 Wed Jun 15 18:48:32 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:39 EST