KNOWLEDGEBASE - ARTICLE #1743

Combining a Bar Graph with a Line Graph in Prism

Occasionally, you may wish to show data using both bars and lines on the same plot, as shown here:  

In this example, we'll plot a time course for plasma concentration of an injected drug, using a fitted exponential decay curve, combined with periodic chemical measurements (activity of a tissue enzyme) made after the injection, shown with vertical bars.

Enter the Data

In the Welcome to Prism dialog box, choose XY data table in the navigator. Under the X column category, select Numbers, and under the Y Columns category, select Enter and plot error values already calculated elsewhere, ​​​​​​and choose Mean with SD. Enter the data as shown below. Include column headings so that it will be easier to keep your data sets straight as we proceed.

In this table, the X values are the times after drug injection, the first Y column contains plasma drug levels, and the second Y column contains the enzyme activity measurement.  The first measurement of enzyme activity is made 30 seconds before drug treatment to establish a control level. There are blank cells because the measurements in this example don't always coincide. Prism has no problem with that.

Fit the Curve

Click on the Graph in the navigator corresponding to this data table to view the plot that Prism creates automatically. The plasma level of the drug is plotted using squares. Click the Analyze button on the bottom row of the toolbar. In the Analyze Data dialog box, choose XY analyses and Nonlinear regression (curve fit) from the list, uncheck B:Enzyme Activity, and click OK.

On the Model tab, choose Exponential > One phase decay. When you click OK to exit this box, Prism adds the fitted curve to your graph.  

Adjust the Frame and Axes

The activity data are shown as square point symbols. They are barely visible because of the scaling of the Y axis to accommodate the plasma concentrations, which are larger numbers. This is a good place to use dual Y axes, giving the enzyme activity data a separate, right-hand scale. Double-click on an Enzyme activity symbol, then choose Right Y axis. Note the new right-hand axis. 

Change Point Symbols to "Bars"

Double-click on an Enzyme activity symbol which opens the Format Graph dialog. Make sure the Data set chosen is Data Table-1:Enzyme activity. Uncheck the Show symbols box and check the Show bars/spikes/droplines box. Here are the selections:

Finish Formatting the Graph

Double-click on the X axis to open the Format Axes dialog. Fill out as shown here:

Type in X and Y axis labels and a graph title. To insert Greek symbols, click where you want the character, then choose Character from the Insert menu and select Insert Greek.



Keywords: combine bar graph line graph

Explore the Knowledgebase

Analyze, graph and present your scientific work easily with GraphPad Prism. No coding required.