7.10.4 Grouped Box Plot


Video Image.png Video Text Image.png Website blog icon circle.png Blog Image 33x33px.png

Summary

In Origin, a grouped box chart can be created from either indexed data or raw data. The indexed data is arranged as one data column and one or more group columns, while the raw data is arranged as multiple data columns grouped according to the column label row(s).

Once a grouped box plot has been created there are many options to customize the box plots and the axes. The customization options are the same for grouped box plots created from raw data as well as those created using indexed data.

Tutorial Grouped Box Plot 01.png

Minimum Origin Version Required: 2015 SR0

What You Will Learn

This tutorial will show you how to:

  • Create a grouped box plot from indexed data
  • Create a grouped box plot from raw data
  • Customize the box plot using the Plot Details dialog
  • Customize the table-style axis tick labels

Steps

Create Grouped Box Plot from Indexed Data

  1. Select Help: Learning Center menu or press F11 key to open Learning Center. Select Graph Sample tab and then select Box Charts from the "Category" drop-down list. Double-click on the graph sample below to open the sample "Box Charts - Grouped Box Chart with Color Indexed Data Points".
    Tutorial Grouped Box Plot 00.png
    Note: This tutorial is associated with the folder Grouped Box Plot and Axis Tick Table of the "Tutorial Data" project:<Origin EXE Folder>\Samples\Tutorial Data.opj.
  2. In the workbook Book10, the data in the CC.MI-Index worksheet is indexed data. Column E is the data column and columns C and D can be used as grouping columns. Highlight column E and select Plot > Categorical : Grouped Box Charts - Indexed Data to open the plot_gboxindexed dialog.
  3. In this dialog, click the trianlge button at the top of Group Column(s) box to select columns C and D.
    Tutorial Grouped Box Plot 02.png
  4. Click OK to create a grouped box plot. The plot will resemble the image below. A new output sheet will be added into the workbook too.
    Tutorial Grouped Box Plot 03.png

For another short tutorial on creating grouped box plots from indexed data, see Example 2.

Customization by Plot Details Dialog

  1. Activate the graph window created from the indexed data. Select and delete the legend object.
  2. Select Format:Plot to open the Plot Details dialog. To customize Symbol style, select the Outlies tab and set the following:
    Tutorial Grouped Box Plot 05.png
  3. On the Spacing tab change Gap Between Subgroups (in %) to 5. On the Lines tab change the line colors as shown below:
    Tutorial Grouped Box Plot 06.png
  4. On the Percentile tab in order to set the Max/99%/1%/Min to none, select the last option in the symbol map. Set the rest of the options as shown below:
    Tutorial Grouped Box Plot 07.png
  5. On the Group tab, for the Border Color row, set the Increment as By One and Subgroup as Within Subgroup .
  6. Next, click the ... button on the right end of the Details column to open the Increment Editor. Click the first color to expand the color chooser, then click the last vacant color under Custom control to open the Colors dialog. In the dialog that opens, you can define a custom color by entering the HSL values (Hue=0, Sat=240, Lum=180). OK to close the dialog. Follow the same procedure for the second color in the Increment Editor dialog with the settings Hue=160, Sat=240, Lum=164. OK out of the Increment Editor:
    Tutorial Grouped Box Plot 08.png
  7. In regard to the Box Color, select the first two colors of current color list to the ones we just defined at the previous step, and then select By One for Increment cell and Within Subgroup for Subgroup cell:
    Tutorial Grouped Box Plot 09.png
  8. Click OK to apply all the previous settings and close the Plot Details dialog. Click on a box, and in the popup mini toolbar, click the Smaller Gap button thrice to reduce the gap between subgroups.
    Tutorial Grouped Box Plot 09a.png
    Finally, the graph should resemble the image below:
    Tutorial Grouped Box Plot 10.png

Customization by Axis Dialog

Continue with the graph from the previous section.

  1. Click on the bottom table row of the X axis, in the popup mini toolbar, click Move to Opposite button to move it to the top axis.
    Tutorial Grouped Box Plot 11a.png
  2. Click on the tick labels of bottom table row to set the font size to 22. And, click the tick labels of top axis to change the font size to 24 using the mini toolbar.
    Tutorial Grouped Box Plot 11.png
  3. Double-click on the bottom axis to open the Axis dialog. With Bottom 1 selected in the left panel, go to the Table sub-tab of Tick Labels tab to set the table format as below:
    Tutorial Grouped Box Plot 11b.png
  4. Select Top 1 in left panel, go to the Table sub-tab of Tick Labels tab to set the table format as below:
    Tutorial Grouped Box Plot 12b.png
  5. Click the Left icon (for Y axis) and change the display format for the Y tick labels:
    Tutorial Grouped Box Plot 12c.png
  6. Click Apply button. To turn on major and minor grid lines, go to the Grids tab and set as following for X(Vertical) and Y(Horizontal) grids respectively:
    Tutorial Grouped Box Plot 13.png
    Tutorial Grouped Box Plot 13b.png
  7. Click OK to apply the settings and close the Axis dialog. The final graph should appear as shown below:
    Tutorial Grouped Box Plot 01.png

You can click to select table labels and nudge them using the arrow keys on your keyboard.