This is a drawing problem rading the use of histogram function since you dont have original data. Then just use the rect function. e.g with you data
yrbreak<-c(0, 1, 2, 3, 3.5, 4.5, 5, 5.5, 6) yrsurfa<-c (0, 0.2, 0.3, 0.3, 0.1, 0, 0.1, 0) plot(yrbreak,yrsurfa,col="white",xaxt="n",xlim=c(0,7),ylim=c(0,1),ylab="") axis(1,yrbreak,paste(yrbreak)) rect(1, 0, 2, 0.2, col = "grey"); # The first rect(2, 0, 3, 0.3, col = "grey"); #The second rect(3, 0, 3.5,0.6, col = "grey"); # ... rect(3.5, 0, 4.5, 0.1, col = "grey"); rect(5, 0, 5.5, 0.2, col = "grey"); Justin BEM BP 1917 Yaoundé Tél (237) 99597295 (237) 22040246 ----- Message d'origine ---- De : squall44 <[EMAIL PROTECTED]> À : r-help@stat.math.ethz.ch Envoyé le : Vendredi, 31 Août 2007, 10h15mn 55s Objet : [R] Histogram Hello, Although I've done lots of research on histograms, I'm still not able to create one. I'd be glad if someone could explain them to me. That's what it eventually should look like: http://www.nabble.com/file/p12423193/histogram.gif The interval limits are: (0), 1, 2, 3, 3.5, 4.5, 5, 5.5, (6) The interval widths are therefore: (1), 1, 1, 0.5, 1, 0.5, 0.5, (0.5) The surface areas are: (0), 0.2, 0.3, 0.3, 0.1, 0, 0.1, (0) I think the argument for the interval limits is breaks, isn't it? How can I define the interval widths? Thanks for any clues Tobias -- View this message in context: http://www.nabble.com/Histogram-tf4359093.html#a12423193 Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@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. _____________________________________________________________________________ l [[alternative HTML version deleted]]
______________________________________________ R-help@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.