Hi people, With: hist(rnorm(200, 10, 3), breaks=20) - how do I centre the ticks below each hist rectangle? Thanks, Phil. -- Philip Rhoades Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275) GPO Box 3411 Sydney NSW 2001 Australia Mobile: +61:0411-185-652 Fax: +61:2:8923-5363 E-mail: pri at chu.com.au
On Sun, 2003-09-07 at 05:23, Philip Rhoades wrote:> Hi people, > > With: > > hist(rnorm(200, 10, 3), breaks=20) > > - how do I centre the ticks below each hist rectangle? > > Thanks, > > Phil. > -- > Philip Rhoadeshist() returns a list of elements, one of which is 'mids', which are the cell centers. Thus, use something like: hist.data <- hist(rnorm(200, 10, 3), breaks=20, axes = FALSE) axis(1, at = hist.data$mids) axis(2) See ?hist for more information. HTH, Marc Schwartz