6.7.2 Bar Graph of African Population


In this tutorial, we will create a graph to compare African population distributions for 2010 vs. predictions for 2050.

Bar Graph of African Population 14.png

Minimum Origin Version Required: Origin 2015 SR0

What you will learn

This tutorial will show you how to:

  • Duplicate graph with data in other columns
  • Set axis scale to reverse a bar chart
  • Merge graphs


To create this graph, we must create four separate bar plots, customize them and merge them into one graph.

Prepare Source Bar Plots with Batch Plotting

  1. Start with an empty Origin workbook, import the data file African_Population.dat under <Origin EXE Folder>\Samples\Graphing path. (Or if you do not have the file in your Origin installation, download the zipped data file from ftp.)
    Bar Graph of African Population 02.png
  2. Highlight column B and select Plot >Basic 2D : Bar to plot a bar graph. Use the Fill Color button Button Fill Color.png in the Style toolbar to change the fill color to Red.
  3. Now we are going to duplicate similar graphs from the other three columns. Right click on the graph window title bar and select Duplicate (Batch Plotting) from the context menu:
    Bar Graph of African Population 03.png
  4. In the dialog that opens, select Column from the Batch Plot with drop-down list, hold Ctrl key and click to select all three columns C, D, E and click OK:
    Bar Graph of African Population 04.png
  5. Three similar graphs will be created (When you get a Reminder Message asking Would you like to rescale the axes to show all the data, select Yes and click OK).
  6. We now have four bar graphs of four groups: male-2010, female-2010, male-2050, female-2050.
    Bar Graph of African Population 05.png

Customize Bar Plots

We will now individually customize the four bar plots.

  1. First we will customize Graph1 (i.e. the one with legend showing male-2010).
  2. Double-click on the data plot to open the Plot Details dialog box. Expand Layer1 node on the left panel and highlight its subnode, on the Pattern tab on right panel, change the Color of Fill to Blue. Click OK to apply the color setting and close the dialog.
  3. Double click on the Y axis (the horizontal axis in bar plot) to open the Axis Dialog. On the Scale tab for Y Axis, set From = 17, To = 0, Value of major tick increment = -5:
    Bar Graph of African Population 06.png
  4. Click the Vertical icon on the left panel and go to Grids tab of X Axis and clear the Show check box under the Minor Grid Lines branch, to hide the minor grid lines. Click Apply:
    Bar Graph of African Population 07.png
  5. Go to the Line and Ticks tab and set Style under Minor Ticks to None:
    Bar Graph of African Population 07b.png
  6. Now we will hide minor grid lines and minor ticks for all other graphs. Click the Apply to... button to bring up Apply To dialog and select the check box beside Ticks and Grid Lines. In the drop-down menus for both, select All Windows in Folder and click OK to apply settings. Now, minor grid lines and ticks in all graph windows in the same folder of Project Explorer will be hidden:
    Bar Graph of African Population 08.png
  7. Next we will customize the Y axis scales for Graph2(female-2010) and Graph3(male-2050). Open the Axis Dialog for each graph and set the axis scales following the screenshots below:
    Bar Graph of African Population 09.png
    Bar Graph of African Population 10.png
  8. Double-click on X axis of Graph4 to open the Axis dialog to set the X-axis scale following the screenshot below:
    Bar Graph of African Population 11.png
  9. Double-click on the data plot of Graph3 (male-2050) and open the Plot Details Dialog. Expand Layer1 node to highlight its subnode, click the Pattern tab on right panel, set the Color for Fill to Blue.
  10. For Graph2(female-2010) and Graph4 (female-2050), select the tick label for X axis (vertical axis) and press the Delete key to remove them. Similarly, remove the axis titles for both X and Y axes. Now you should have four customized bar plots like those below:
    Bar Graph of African Population 12.png

Merge Multiple Graphs

Now we have four distinct bar graphs. We will merge these four graphs and do some final customizations, such as adding text annotations.

  1. Activate one of the four graph windows and select Graph: Merge Graph Windows from the main menu. This opens the merge_graph dialog box. Edit the settings as follows and merge these four bar graphs into one graph window.
    Bar Graph of African Population 13.png
  2. In the merged graph, drag the two Y (horizontal) axis titles "Population (million)" to center align them. Sequentially select and delete the four graph legends.
  3. Right click on an open space in the graph layer and select "Add Text". Type to create the four text labels. The text labels used are:
  • Figure 1. African population by five – year age groups and sex, 2010 versus 2050
  • 2010
  • Males
  • Females
  • 2050
  • Males
  • Females
  • Source: Population Division of the Department of Economic and Social Affairs of the United Nations Secretariat,
    World Population Prospects: The 2008 Revision, http://www.un.org/en/index.html, Monday, April 12, 2010; 3:19:17 PM.

You may further customize the position, text font, size, color and alignment of the newly added labels. Your final graph should look much like the the graph pictured below.

Bar Graph of African Population 14.png