[R] histogram tick labels

S Ellison S.Ellison at lgc.co.uk
Mon Jun 9 09:36:23 CEST 2008


Lawrence,

use hist(..., axes=F)
then put your own axis on with axis(1,...)
Example:
y<-rnorm(200)
hist(y,axes=F)
axis(2)
axis(1, at=seq(-3,3,1))

Steve E

>>> "Lawrence Hanser" <larry at hanser.net> 06/09/08 7:02 AM >>>
Dear Friends,

I am doing a rather simple histogram on a vector of data, MR.  I set
breaks for the intervals:

hist(MR,breaks=c(0, 2.9, 5.9, 8.9, 11.9,14.9, 17.9, 20.9))

My question is, how do I change the labels on the tick marks?  I have
looked at ?hist and can't find a clue...

Thanks in advance.

Larry

______________________________________________
R-help at 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.


*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}



More information about the R-help mailing list