Cumulative histogram with percentage on the Y axis

histogram, percentage, plot, r

Solution

Isn't this a plot of the empirical cumulative distribution function? As in

plot(ecdf(x))

which produces:

Problem

I wish to plot in R project a cumulative histogram where on the Y axes is reported the percentage instead of the frequency ``` x <- c(rnorm(100), rnorm(50, mean=2,sd=.5)) h <- hist(x, plot=FALSE, breaks=20) h$counts <- cumsum(h$counts) h$density <- cumsum(h$density) plot(h, freq=TRUE, main="(Cumulative) histogram of x", col="white", border="black") box() ``` Thanks for help

Original source