# ::Free Statistics and Forecasting Software::

v1.1.23-r7
Secure website (SSL) | Donate to wessa.net

### :: Histogram - Free Statistics Software (Calculator) ::

All rights reserved. The non-commercial (academic) use of this software is free of charge. The only thing that is asked in return is to cite this software when results are used in publications.

This free online software (calculator) computes the histogram for a univariate data series (if the data are numeric). In addition, a frequency table is computed with the following statistics: absolute frequency, relative frequency, cumulative relative frequency, midpoints, and density.
For categorical (non-numeric) data the software computes the frequency table and an associated Frequency Plot.

Enter (or paste) your data delimited by hard returns.

 Send output to: Browser Blue - Charts White Browser Black/White CSV MS Excel MS Word Data (click to load default data) 108.2 108.8 110.2 109.5 109.5 116 111.2 112.1 114 119.1 114.1 115.1 115.4 110.8 116 119.2 126.5 127.8 131.3 140.3 137.3 143 134.5 139.9 159.3 170.4 175 175.8 180.9 180.3 169.6 172.3 184.8 177.7 184.6 211.4 215.3 215.9 244.7 259.3 289 310.9 321 315.1 333.2 314.1 284.7 273.9 216 196.4 190.9 206.4 196.3 199.5 198.9 214.4 214.2 187.6 180.6 172.2 187.2 Sample Range:(leave blank to include all observations) From: To: Number of bins(leave empty to use default) (?) Colour greywhiteblueredblackbrownyellow Bins are closed on right side FALSETRUE Scale of data UnknownInterval/Ratio3-point Likert4-point Likert5-point Likert6-point Likert7-point Likert8-point Likert9-point Chart options Width: Height: Title: Label x-axis:

 Source code of R module par1 <- as.numeric(par1) if (par3 == "TRUE") par3 <- TRUE if (par3 == "FALSE") par3 <- FALSE if (par4 == "Unknown") par1 <- as.numeric(par1) if (par4 == "Interval/Ratio") par1 <- as.numeric(par1) if (par4 == "3-point Likert") par1 <- c(1:3 - 0.5, 3.5) if (par4 == "4-point Likert") par1 <- c(1:4 - 0.5, 4.5) if (par4 == "5-point Likert") par1 <- c(1:5 - 0.5, 5.5) if (par4 == "6-point Likert") par1 <- c(1:6 - 0.5, 6.5) if (par4 == "7-point Likert") par1 <- c(1:7 - 0.5, 7.5) if (par4 == "8-point Likert") par1 <- c(1:8 - 0.5, 8.5) if (par4 == "9-point Likert") par1 <- c(1:9 - 0.5, 9.5) if (par4 == "10-point Likert") par1 <- c(1:10 - 0.5, 10.5) bitmap(file="test1.png") if(is.numeric(x[1])) { if (is.na(par1)) { myhist<-hist(x,col=par2,main=main,xlab=xlab,right=par3) } else { if (par1 < 0) par1 <- 3 if (par1 > 50) par1 <- 50 myhist<-hist(x,breaks=par1,col=par2,main=main,xlab=xlab,right=par3) } } else { plot(mytab <- table(x),col=par2,main="Frequency Plot",xlab=xlab,ylab="Absolute Frequency") } dev.off() if(is.numeric(x[1])) { myhist n <- length(x) load(file="createtable") a<-table.start() a<-table.row.start(a) a<-table.element(a,hyperlink("http://www.xycoon.com/histogram.htm","Frequency Table (Histogram)",""),6,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,"Bins",header=TRUE) a<-table.element(a,"Midpoint",header=TRUE) a<-table.element(a,"Abs. Frequency",header=TRUE) a<-table.element(a,"Rel. Frequency",header=TRUE) a<-table.element(a,"Cumul. Rel. Freq.",header=TRUE) a<-table.element(a,"Density",header=TRUE) a<-table.row.end(a) crf <- 0 if (par3 == FALSE) mybracket <- "[" else mybracket <- "]" mynumrows <- (length(myhist\$breaks)-1) for (i in 1:mynumrows) { a<-table.row.start(a) if (i == 1) dum <- paste("[",myhist\$breaks[i],sep="") else dum <- paste(mybracket,myhist\$breaks[i],sep="") dum <- paste(dum,myhist\$breaks[i+1],sep=",") if (i==mynumrows) dum <- paste(dum,"]",sep="") else dum <- paste(dum,mybracket,sep="") a<-table.element(a,dum,header=TRUE) a<-table.element(a,myhist\$mids[i]) a<-table.element(a,myhist\$counts[i]) rf <- myhist\$counts[i]/n crf <- crf + rf a<-table.element(a,round(rf,6)) a<-table.element(a,round(crf,6)) a<-table.element(a,round(myhist\$density[i],6)) a<-table.row.end(a) } a<-table.end(a) table.save(a,file="mytable.tab") } else { mytab reltab <- mytab / sum(mytab) n <- length(mytab) load(file="createtable") a<-table.start() a<-table.row.start(a) a<-table.element(a,"Frequency Table (Categorical Data)",3,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,"Category",header=TRUE) a<-table.element(a,"Abs. Frequency",header=TRUE) a<-table.element(a,"Rel. Frequency",header=TRUE) a<-table.row.end(a) for (i in 1:n) { a<-table.row.start(a) a<-table.element(a,labels(mytab)\$x[i],header=TRUE) a<-table.element(a,mytab[i]) a<-table.element(a,round(reltab[i],4)) a<-table.row.end(a) } a<-table.end(a) table.save(a,file="mytable1.tab") }
 Top | Output | Charts | References | History | Feedback

 Cite this software as: Wessa P., (2012), Histogram (v1.0.12) in Free Statistics Software (v1.1.23-r7), Office for Research Development and Education, URL http://www.wessa.net/rwasp_histogram.wasp/ The R code is based on : Venables, W. N. and Ripley. B. D. (2002), Modern Applied Statistics with S, Springer.
 Top | Output | Charts | References | History | Feedback
 Top | Output | Charts | References | History | Feedback
 To cite Wessa.net in publications use:Wessa, P. (2013), Free Statistics Software, Office for Research Development and Education, version 1.1.23-r7, URL http://www.wessa.net/ © All rights reserved. Academic license for non-commercial use only. The free use of the scientific content, services, and applications in this website is granted for non commercial use only. In any case, the source (url) should always be clearly displayed. Under no circumstances are you allowed to reproduce, copy or redistribute the design, layout, or any content of this website (for commercial use) including any materials contained herein without the express written permission. Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. We make no warranties or representations as to the accuracy or completeness of such information (or software), and it assumes no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site. Software Version : 1.1.23-r7Algorithms & Software : Patrick Wessa, PhDServer : www.wessa.net