Re: [R] Changing X axis values

2015-12-18 Thread Amelia Marsh
Dear Sir Thanks a lot for your great help. I had tried the argument by = 1000, but wasn't aware of "seq". Thanks again. With regards Amelia On Friday, 18 December 2015 5:00 PM, Jim Lemon wrote: Hi Amelia,The usual way is: plot(...,xaxt="n")axis(1,at=seq(0,18000,by=1000) However, you wil

Re: [R] Changing X axis values

2015-12-18 Thread Michael Dewey
Dear Amelia As well as Jim's excellent advice you may want to look at the las parameter which enables you to alter the orientation. Of course you then have to lie on your side to read them or turn your monitor through pi/2 On 18/12/2015 11:30, Jim Lemon wrote: Hi Amelia, The usual way is:

Re: [R] Changing X axis values

2015-12-18 Thread Jim Lemon
Hi Amelia, The usual way is: plot(...,xaxt="n") axis(1,at=seq(0,18000,by=1000) However, you will get overlapping labels unless you use a small font or a large graphics device. You may want to look at the staxlab function in the plotrix package. Jim On Fri, Dec 18, 2015 at 10:20 PM, Amelia Mars

[R] Changing X axis values

2015-12-18 Thread Amelia Marsh via R-help
Dear Forum, Assuming I need to plot a graph. In the code I have defined X axis range as xlim=c(0,18000) In the plot, the values visible w.r.t X axis are 0, 5000, 1, 18000. To improve the graph clarity, is there any way I can show the values of X axis as 0, 1000, 2000, 3000, 4000, 5000

Re: [R] Changing x-axis values displayed on histogram

2012-07-10 Thread jlwoodard
Perfect! Thanks so much, Sarah! -- View this message in context: http://r.789695.n4.nabble.com/Changing-x-axis-values-displayed-on-histogram-tp4636032p4636051.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailin

Re: [R] Changing x-axis values displayed on histogram

2012-07-10 Thread Sarah Goslee
Hi, Thanks for providing a small reproducible example. You can disable the default axis and make your own custom version: hist(histexample,breaks=bins, xaxt="n") axis(1, at=seq(5.5, 15.5, by=2), labels=c("5-6", "7-8", "9-10", "11-12", "13-14", "15-16")) Sarah On Tue, Jul 10, 2012 at 3:34 PM, j

[R] Changing x-axis values displayed on histogram

2012-07-10 Thread jlwoodard
Is it possible to change the x-axis values in a histogram to reflect binned values? Here are my data: histexample<-c(6,7,7,8,8,8,9,9,9,9,9,10,10,10,10,10,10,10,11,11,11,11,11,11,12,12,12,12,13,13,13,14,14,14,15,16) hist(histexample) Now, I'll bin pairs of adjacent values together (e.g., 5-6, 7-8