[R] hist plot

David Barron mothsailor at googlemail.com
Fri Oct 6 09:33:04 CEST 2006


This is taken from the help for the hist function:

"Typical plots with vertical bars are not histograms. Consider barplot
or plot(*, type = "h") for such bar plots."

For example:
> x <- rchisq(100, df = 4)
>
> op<-hist(x, freq = FALSE, ylim = c(0, 0.2))
> plot(op$mids,op$counts,type="h")


On 06/10/06, Baoqiang Cao <caobg at email.uc.edu> wrote:
> Hi there,
>
> I really couldn't find out how to plot histogram with point/line instead of rectangle for each bin? Any help please? Thanks!
>
> Best,
>  -Cao
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>


-- 
=================================
David Barron
Said Business School
University of Oxford
Park End Street
Oxford OX1 1HP



More information about the R-help mailing list