6.6.6 Grouped Stacked Column

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


In Origin, multiple datasets can be plotted as a stacked column graph. Usually these datasets are grouped together by default. In addition, subgrouping is possible for stacked column graphs such as the one shown below with 2 subgroups:
Grouped Stacked Column 08.png

Minimum Origin Version Required: 2020

What will you learn

This tutorial will show you how to:

  • Plot a stacked column graph
  • Subgroup the stacked column
  • Create and customize an X axis table for the graph

Steps to Create a Grouped Stacked Column Plot

This tutorial is associated with the Grouped Stacked Column folder in the project <Origin EXE Folder>\Samples\Tutorial Data.opj.

Note: You can also access this sample graph by double-clicking on its thumbnail under the Column and Bar graph sample in the Learning Center dialog(Help: Learning Center menu or press F11) .

  1. Activate the worksheet Sheet1, highlight col(B)~col(G) and select Plot > Basic 2D: Stacked Column from the menu to create a stacked column graph:
    Grouped Stacked Column 01.png
  2. Double-click on the column plot to open the Plot Details dialog. On the Group tab, select By Size for Enable subgroup and set Subgroup Size to 3.
    Grouped Stacked Column 02 2.png
  3. On the Label tab, check the Enable checkbox.
    Grouped Stacked Column 03 2.png
  4. Select Layer1 in left panel of Plot Details dialog and click the Stack tab. Check the Offset Within Subgroup(in Group tab) for Cumulative/Incremental check box. Click the Apply button.
    Grouped Stacked Column 05.png
  5. Click OK to close the dialog. Select Graph: Rescale to Show All from the main menu.
    Grouped Stacked Column 01 2.png

Steps to Create a Tick Label Table for X Axis

  1. To create two rows of tick labels for the X axis, double-click on the X axis tick labels to open the Axis dialog.
    • Go to Bottom icon with Tick Labels tab selected.
    • Under Format tab, change Font Size to 16
    • Under Table tab, check the Enable checkbox and set Number of Rows to 2. Bottom icon will change into Bottom 1 and Bottom 2 on the left panel.
    • Set the Table layout as shown below:
      Grouped Stacked Column 06.png
    • Select the Bottom 2 icon and set Dataset Name to [Book1J]Sheet1!label in Display tab, and set the Font size to 12 in the Format tab. This will change the tick label row to the car names from the worksheet label (Y) column.
    • Set the table layout as the dialog below:
      Grouped Stacked Column 07.png
  2. Click OK button to close the dialog. Move the Legend box inside the layer. Click on the layer, and in the popup mini toolbar, click Layer Frame button to show the layer frame.
    Grouped Stacked Column 07a.png

More Customization Steps

The following steps can further customize the graph to be exactly the same as the image in Summary.

  1. Double-click on the column plot to open the Plot Details dialog. On Group tab, click the Button browser.png button in the Details column of the Fill Color row. Increment Editor opens.
  2. Click on the arrow to the right of the first color, then click on an empty color well under Custom. In the Color dialog that opens, set the Red, Green and Blue values to 165, 196 and 0, then click OK.
  3. Create five more custom colors using these RGB values: (243, 62, 12), (243, 200, 30), (0, 64, 127) (119, 0, 31), and (124, 191, 243).
  4. Click on the number (7) and (8) to left of the next color in the Increment Editor list separately, click Delete button to remove these colors so that you have just the six custom colors that you just created. Click OK to close the Increment Editor.
    Grouped Stacked Column 02.png
  5. On the Label tab, expand the Font control mini-panel, set Size to 12, Color to Dark Gray and click on the Bold button. Choose Custom as Label Form and enter $(p,.0)% in Format String box. This adjusts the labels on the columns.
    Grouped Stacked Column 03.png
  6. Click the Spacing tab and increase the Gap Between Bars(in %) to 30.
    Grouped Stacked Column 04.png
  7. Select Layer1 in left panel of Plot Details dialog and click the Stack tab. Check the Show Total Label on Stacked Column/Bar.
    Grouped Stacked Column 09.png
  8. On the Group tab, change Edit Mode to Independent. Click OK button to close the dialog.
  9. Now, as you can see, the labels on the dark bars are hard to read. We need change their colors to make it "white out".
    1. Click on one of the labels of Ferrari Central plot as below to select the labels, in the popup mini toolbar, use Font Size and Font Color button to change its size to 11 and color to LT Gray.
      Grouped Stacked Column 09a.png
    2. Click on one of the labels of Ferrari West plot to select the labels, in the popup mini toolbar, use Font Color button to change its color to LT Gray.
  10. Right-click on en empty portion of the graph window and select Add/Modify Layer Title from the context menu. Type Sales as a layer title.
  11. Resize as needed, using the green selection handles. Finally, you will get the graph as the Summary shows.