P4-One-variable Bar Graphs
P4-One-variable Bar Graphs
0
Step-by-Step Examples
There are three ways to make a bar graph in Prism, each using a different graph type. This article shows how to
create and format a column bar graph, so named because each bar shows the mean of all Y values in a column
(data set). This approach is recommended when you have one grouping variable, because the table format is the
same as that necessary to do several other analyses, such as t tests, one-way ANOVAs, and column statistics. You
may, however, be interested in the following related Step-by-Step Examples:
If you have two grouping variables, consult “Bars Graphs with Two Grouping Variables”.
If you want to plot bars and lines together on the same graph, or to place bars along a true X axis where
horizontal position of the bars is determined by X value, see “Combining a Bar Graph with a Line Graph”.
For histograms—bar graphs that illustrate frequency distributions—see “Histograms and Frequency
Distributions”.
1 Adapted from: Miller, J.R., GraphPad Prism Version 4.0 Step-by-Step Examples, GraphPad Software Inc., San
Diego CA, 2003. Step-by-Step Examples is one of four manuals included with Prism 4. All are available for
download as PDF files at www.graphpad.com. While the directions and figures match the Windows version of
Prism 4, all examples can be applied to Apple Macintosh systems with little adaptation. We encourage you to print
this article and read it at your computer, trying each step as you go. Before you start, use Prism’s View menu to
make sure that the Navigator and all optional toolbars are displayed on your computer.
2003 GraphPad Software, Inc. All rights reserved. GraphPad Prism is a registered trademark of GraphPad
Software, Inc. Use of the software is subject to the restrictions contained in the software license agreement.
1
8
0
Untreated Placebo Treated
Treatment Group
Our data are organized by one grouping variable, Treatment Group, which has three levels—Untreated, Placebo,
and Treated. Therefore, in the Welcome dialog, select the tab for One grouping variable.
Prism displays 10 choices for the graph type. You can switch freely between the buttons, reading the “Selected
graph” descriptions if you don’t find the thumbnail illustrations clear. Note that you are not limited to using bars
on a column (one-grouping-variable) graph; you may also choose dot plots (column scatterplots), box-and-
whiskers configurations, etc. The top-middle button—for vertical bars—is the correct choice for our intended
graph. Click OK to exit the Welcome dialog. Prism creates and displays the new table.
The table contains no X column, and for each data set (A, B, C,...; each corresponding to a level of the grouping
variable), there is a single Y column. With no X values, there is no categorical distinction from row to row, so
replicate values can now be stacked vertically within single columns.
Click the default table name in the drop-down list on the toolbar. Type a new name for the table. This name will be
used as the title for your graph and in the names of other sheets linked to the table (note, however, that you are
free to name any of those sheets independently).
Enter the values shown below into your table. Be sure to include column headings. The name of the grouping
variable is not included on the table, but the levels are identified in the Y-column headings “Untreated”, “Placebo”,
and “Treated”.
2
You can change the number format if you wish. Select all of the columns you want to change, then choose
Number Format… from the drop-down list under the Change button.
Prism creates the column bar graph automatically. In the Navigator, choose the sheet Plasma level of GP-
14858 graph (or the name you gave to the data table earlier).
5.0
2.5
0.0
Untreated Placebo Treated
Note that Prism fills each bar with a different pattern—each bar in this graph represents a different data set
(column), and Prism always colors/patterns bars or symbols according to data set. If you want to override that
default to make all the bars look the same, follow the directions on page 5 for changing bar appearance, using the
button for changing all data sets at once:
3
When you exit the dialog, Prism displays the Results sheet.
Remember that this sheet is linked to the original data table, so that if you change that data, these results will be
updated automatically.
4
To: Do this:
Adjust axis title position Position the mouse pointer near the axis title
(avoiding tick labels) to display a two-headed-
arrow. Click and drag title away from, or closer
to, the axis.
Edit Y axis title Click on the default “YTitle”. The text will flip
to horizontal. Type the replacement title. When
done, click elsewhere to flip the title back. Use
the α button to enter Greek letters.
Convert the error bars from Double-click on a bar, then choose the
SEM to SD Appearance tab. Click the All button to
change all data sets at once. Set Plot to Mean
& SD.
5
Rearranging Bars
Under Data sets plotted (left to right), Prism shows the order of the bars on the graph. Select the data set you
wish to move, then click Top, Up, Down, or Bottom as appropriate. Or you can completely invert the order of
the bars by clicking Reverse.
But this widens the bars at the same time. It is a good way to make more room for baseline labels that are so long
that they overlap with adjacent labels.
You may wish to introduce additional spacing into a bar graph to isolate a particular bar or group of bars. In the
Data sets plotted section, select the data set (bar) that is to immediately follow the additional gap, then change
Space between selected data set and the previous one. For example, the settings below produce additional
spacing between the second and third bars.
6
Plasma level of GP-14858
7.5
5.0
2.5
0.0
Untreated Placebo Treated