R offers a density smoother for superimposing a smoothed curve on a histogram which is nicer than the alternatives offered in SPSS (mainly a spline-based smoother). You can use the form below to make one of these histograms.


The following information is required.

Title of your plot:

Name of your data:

Now your data (numbers separated by any kind of white space):


The following parameters are optional, but can be used to customize the appearance. It is okay to leave everything below the line alone, or you can play with the parameters to see what they do.

Histogram Parameters

Rule for claculating Breakpoints between bins:
To manually select the number of bins, choose fixed number above and set the number here:

You might find the R man page for hist() useful.

Density Parameters

Kernel function (this controls relative weights of center of sliding window and endpoints of window).
Window width (this controls the width of the sliding window). This is scaled so that the default choice for the kernel you have chosen is 1. (This is the R parameter width, not bw).

Density Line Type:
Density Line Color:

You might find the R man page for hist() useful.


To gain a better understanding of how to write new demonstrations for this web site, you can view the source of this page. Then you can view the source of the histogram.R script that is run as a callback.

Page developed by Russell Almond.