# ::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) 0.28 0.95 0.96 0.97 0.4 0.18 0.12 0.62 1.81 1.51 1.41 1.39 1.2 1.55 1.48 1.25 0.95 1.33 0.92 0.85 1.06 0.69 0.7 0.79 2.93 3.24 3.42 2.79 2.54 3.28 2.8 3.4 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:

Click here to edit the underlying code of this R Module.

 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
 © Wessa.Net 2002-2013

 [Select module] Main Menu Equation Plotter   Scientific Forecasting   Descriptive Statistics -Central Tendency -Variability -Skewness/Kurtosis -Quartiles -Percentiles -Stem and Leaf -Histogram -Kernel Density -Harrell-Davis -Univariate EDA -Bootstrap -Blocked Bootstrap -Mean Plot -SD Plot -(P)ACF -Spectrum -SD Mean-Plot -Variance Reduction -Correlation -Kendall Rank Corr. -Simple Regression -Bivariate KDE -Box-Cox Linearity -Regression Validation -Back-Back Histo. -Partial Correlation -Trivariate Scatter -Kendall tau Matrix -Notched Boxplots -Star Plot   Distributions -Normal ML Fit -Beta ML Fit -Cauchy ML Fit -Exponential ML Fit -Gamma ML Fit -Lognormal ML Fit -Logistic ML Fit -Neg. Binom. ML Fit -Poisson ML Fit -Weibull ML Fit -Tukey lambda PPCC -Box-Cox Normality   Hypothesis Tests -Mean -Skewness/Kurtosis   Multiple Regression -Estimate Equation   About this server

 Home Page Equation Plotter Time Series Analysis Multiple Regression Descriptive Statistics Statistical Distributions Hypothesis Testing Simon Fraser University Aston University Academic citations Computations Archive Search Computations R Project FAQ About Wessa.net Powered by Linux Server status page Any R Server'Herman Ole Andreas Wold''Gwilym Jenkins''Sir Ronald Aylmer Fisher''George Udny Yule''Gertrude Mary Cox''Sir Maurice George Kendall'Installed PackagesHistory list