When you create your plot us the argument xaxt='n'.  That will suppress the 
default axis labels and tick marks.  Then use the axis function which lets you 
specify exactly where you want the tick marks and exactly what you want the 
labels to be.  You can also specify tck=1 as an argument if you want grid lines 
(see ?par for details).

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111


> -----Original Message-----
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of Trafim Vanishek
> Sent: Tuesday, February 02, 2010 8:12 AM
> To: r-help@r-project.org
> Subject: [R] Plot - specification for grid of x axis
> 
> Dear all,
> 
> I have a simple question for which I cannot find the answer.
> 
> I need to make an easy plot, but for the x axis I need to be able to
> specify
> by myself the division of x axis from x[,1] either every single
> observation,
> or every 5th, or 10th or 20th
> 
> x <- matrix(data=NA, nrow=100, ncol=2)
> x[,1]<-seq(1,100,1)
> x[,2]<-rnorm(100)
> 
> Thanks a lot for your help!!!
> 
>       [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to