[R] Question about setting tick mark limits in Plot

Justin Rhodes rhodesju at ohsu.edu
Wed Dec 29 21:49:56 CET 2004

Dear R-list,

I am having trouble getting the Plot function to set the tick marks the
way I want, and I am not sure what I am doing wrong.  

Below is the code that I wrote, and I am not sure why it doesn't work. 
p is a vector of length 2198, containing numbers between 0 and 240.  q
is a vector of ones, the same length as p.  I want the x-axis to have
tick marks every 30 min and I want the last tick mark to be at 240 min. 
When I run the program it only plots 5 tick marks starting at 0 and
ending at 200,  though the data extend to 240 min.  I am very confused. 
Thanks for any help.  I really appreciate it.  I have wasted too much
time trying to figure this out on my own.


plot(p,q, pch="|", yaxt="n", main=subject,xlab="Minutes", ylab="")

Take care,

Justin Rhodes
Behavioral Neuroscience
Oregon Health & Science University
VA Medical Center (R & D 12)
3710 SW US Veterans Hospital Rd
Portland, OR  97239
Phone: (503) 220-8262 extn 54392
Fax: (503) 721-1029
E-mail: rhodesju at ohsu.edu

More information about the R-help mailing list