Skip to main content
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
Show menu

Multiple comparison graphs

Next selectMultiple comparison graphs


Multiple comparison graphs allow to visualize differences between subgroups of a variable, or the influence of a qualitative (discrete) factor on another (continuous) variable.

The graph can be composed from different elements: Bars, Horizontal lines, Markers and or Connecting lines for mean or median, with choice of different error bars for mean (95% CI, 1 SEM, 1 SD, 2 SD, 3 SD, range) or median (95% CI, 25-75 percentiles, 10-90 percentiles, 5-95 percentiles, 2.5-97.5 percentiles, 1-99 percentiles, range), Box-and-whisker plot or Notched box-and-whisker plot, Violin plot, and/or Dot plot (display all data).

Required input

The following need to be entered in the dialog box: for Data select a continuous variable, and for Factor codes a qualitative factor. The qualitative factor may either be character or numeric codes. These codes are used to break-up the data into several subgroups.

When you want to use a continuous variable as the qualitative, discrete factor, you can convert the continuous data by using the Create groups tools.

Dialog box for multiple comparison graphs

Several elements can be selected to compose the graph, and some of these can be combined.

The box-and-whisker plot in combination with dot plot has the advantage of displaying a statistical summary of the data (range, quartiles and median), without concealing the data.

If the data require a logarithmic transformation, select the Logarithmic transformation option.


Chart with bars representing the mean age of patients in a multicenter study.
'Error bars' represent 95% confidence intervals.

Bar diagram with error bars

Chart with all data points for systolic blood pressure.
'Error bars' represent 95% confidence intervals.
A line connects the mean of the two treatment groups (coded 0 and 1).

Dot plot with error bars

Chart with the evolution of sperm motility during 12 years.
The means for every year are connected by a line.
Error bars represent 95% confidence intervals for the mean.

Line graph with error bars


See also

Recommended book

Book cover

Exploratory Data Analysis
John W. Tukey

Buy from Amazon

The approach in this introductory book is that of informal study of the data. Methods range from plotting picture-drawing techniques to rather elaborate numerical summaries. Several of the methods are the original creations of the author, and all can be carried out either with pencil or aided by hand-held calculator.