Re: [R] help in histogram

2010-04-07 Thread Changbin Du
HI, Stephan, Thanks so much! IT works, I appreciated very much! On Wed, Apr 7, 2010 at 10:06 AM, Stephan Kolassa wrote: > Hi, > > first get the densities without plotting the histogram: > > foo <- hist(x, plot=FALSE) > > then plot the histogram and feed the rounded densities, converted to > ch

Re: [R] help in histogram

2010-04-07 Thread Stephan Kolassa
Hi, first get the densities without plotting the histogram: foo <- hist(x, plot=FALSE) then plot the histogram and feed the rounded densities, converted to character, to the labels argument (instead of just labels=TRUE): hist(x, freq=F, xlab='',ylab="Percent of Total", col="skyblue", labels

[R] help in histogram

2010-04-07 Thread Changbin Du
x<- sample(1:14, 319, rep=T) hist(x, freq=F, xlab='',ylab="Percent of Total", col="skyblue", labels=TRUE, right=FALSE,main="Position of Hypothetical Protein") Is there is way to round the labels to 2 decimal digits, for example, 0.088 is changed to 0.09. Thanks! -- Sincerely, Changbin --