6.10.7 Unbalanced Grouped Box Chart

Summary

Origin can be used to create unbalanced grouped box plots from raw data with custom table axis.

Unbalanced Box Chart 01.png

Minimum Origin Version Required: 2015 SR0

What you will learn

This tutorial will demonstrate how to:

  • Create a unbalanced grouped box plot from raw data
  • Add a top axis table row with additional grouping information
  • Customize the table-axes

Steps

Creating the Box Plot from Raw Data

This tutorial is associated with <Origin EXE Folder>\Samples\Tutorial Data.opj.

  1. Open Tutorial Data.opj and browse to the folder Unbalanced Grouped Box Chart.
  2. Activate the workbook Book 3.
  3. Highlight all the columns except col(A), select Plot> Categorical: Grouped Box Charts - Raw Data menu to open the Plotting: plotgboxraw dialog. In the dialog, set the Group Number to 2, the 1st Group Row to Continents and the 2nd Group Row to Country. This will create a box chart with the column data arranged in three groups, with X axis row names derived from the two selected label rows on the worksheet:
    Unbalanced Box Chart 03.png
  4. Click the OK button. Select the legend and delete it and the grouped box chart from raw data is created with two grouping levels as shown below:
    Unbalanced Box Chart 06.png

Customizing the axis table to display unbalanced groupings

  1. The color and sub-group gap need some work. So, begin by changing all boxes to gray. Select Format: Plot from the menu. In the Plot Details dialog box, click the Group tab. Set Border Color Increment to None and Subgroup to None, so that box border color does not increment by dataset.
    Unbalanced Box Chart 07.png
  2. Go to the Pattern tab and duplicate the settings as shown below:
    Unbalanced Box Chart 08.png
  3. Go to the Spacing tab and set Gap Between Subgroups (in%) to 0 to remove the gap between sub-groupings.
    Unbalanced Box Chart 09.png
  4. Click OK to apply the settings. Now our unbalanced grouped box chart is correctly drawn (we will adjust the labels later).
    Unbalanced Box Chart 10.png

Add a top axis table row

We will now add an axis table top of the graph to display extra grouping information.

  1. Open the Axis Dialog again (Format: Axes: X-Axis). Go to Tick Labels tab and click to highlight the Bottom 1 icon only on the left panel.
  2. Go to Table tab in Tick Labels page and change Number of Rows to 3.
    Unbalanced Box Chart 11.png
  3. Click to select the newly added Bottom 3 icon on the left panel and go to Display tab to set the Display list to Rank (note that this is another worksheet label row).
    Unbalanced Box Chart 12.png
  4. Click Apply to see the changes. A new table row is added to the bottom X axis. Next, we will move it to the top of the graph.
    Unbalanced Box Chart 13.png
  5. Right click the Bottom 3 icon on the left panel and select Move to Opposite.
    Unbalanced Box Chart 14.png
  6. Click OK to apply the change.
    Unbalanced Box Chart 15.png

Further customization

Now, let's do some further customization so that our graph looks like the one pictured in the introduction to this tutorial.

  1. Double click on the grouping table on the bottom of graph to bring up Axis Dialog, go to Tick Labels tab and click to select Bottom 1 icon only again.
  2. Go to Table tab, clear the Far Parallel Border check box for Bottom 1.
    Unbalanced Box Chart 17.png
  3. Click to highlight the Bottom 2 icon on left panel, uncheck Auto box and clear the Inside Border and Outside Border check boxes.
  4. Click to highlight the Top 1 icon on left panel and clear the Far Parallel Border, Inside Border and Outside Border check boxes. Select the Tick at Beginning of Cell and Tick at End of Cell check boxes.
    Unbalanced Box Chart 18.png
  5. Click Apply and then go to Line and Ticks tab and set Style under Major Ticks node to be In & Out.
    Unbalanced Box Chart 19.png
  6. Go to Grids tab and customize both major and minor grid lines settings as Color = Black, Style = Dot and Thickness = 0.5.
    Unbalanced Box Chart 20.png
  7. Click Apply and go to Scale tab, click Vertical icon on left panel and change scale Type to Log10, and adjust the other settings as shown below.
    Unbalanced Box Chart 21.png
  8. Go to Tick Labels tab and enter a Suffix of % to apply this character to each of the Y axis labels.
    Unbalanced Box Chart 22.png
  9. Click OK to apply the above changes.
    Unbalanced Box Chart 23.png
  10. Click Format: Page and set Width = 14.0 (you can leave the Height setting, as it is).
  11. Double-click on the Country labels in the graph and set font Size = 14.
  12. To add a graph title, click the Text tool, click somewhere in the heading of the graph and enter Female Tertiary Education (ISCED 5 and 6) Enrollment, and change Y axis title to be Enrollment Rate.