[R] Graphics question

Dimitris Rizopoulos dimitris.rizopoulos at med.kuleuven.be
Thu Mar 2 16:57:07 CET 2006


try the following:

plot(..., xaxt = "n")
axis(1, at = 1:2)

I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://www.med.kuleuven.be/biostat/
     http://www.student.kuleuven.be/~m0390867/dimitris.htm


----- Original Message ----- 
From: "Bowden, J.M." <jmb56 at leicester.ac.uk>
To: <r-help at stat.math.ethz.ch>
Sent: Thursday, March 02, 2006 4:41 PM
Subject: [R] Graphics question


>
> Hi
>
> I am trying to plot two points (with confidence intervals) on a 
> graph to
> illustrate the value of a particular quantity after 1 and 2 
> iterations
> respectively.
>
>
> I'm doing this by
>
> plot(cycle,alpha[2,],main="",ylim=c(-8,-3),cex=2,col="red",pch=19,ylab=e
> xpression(alpha),xlab="cycle")
>
> Etc..
>
> Where
>
>
>> cycle
> [1] 1 2
>> alpha
>          [,1]      [,2]
> [1,] -6.227266 -5.762146
> [2,] -5.200972 -5.010401
> [3,] -4.174677 -4.258655
>
>
> When I plot this I get the x-axis scale reading 1.0,1.1,1.2,...,2.0
>
> I want to get it to read simply                 1                2
>
>
> Is there an easy way to do this?
>
> ______________________________________________
> 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
> 


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm




More information about the R-help mailing list