6.6.6 Grouped Stacked Column

Contents


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


Summary

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: 2021 SR0

What will you learn

This tutorial will show you how 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) .

There are two methods to create s grouped stacked column plot:

Method 1: Using the Online Template

  1. Highlight col(B)~col(G) , choose menu Plot: Template Library to open Template Library. Click the Open Template Center button in the upper-right corner.
    Grouped Stacked Column M1 01.png
  2. The Template Center will be opened. Search the online template "Side-by-side Stacked Columns" and download it.
    Grouped Stacked Column M1 02.png
  3. After the template is downloaded, close the Template Center. This template will be listed in the Template Library. Select it and click Plot Button to plot the graph.
    Grouped Stacked Column M1 03.png
  4. You will get the graph as below:
    Grouped Stacked Column M1 04.png

Method 2: Subgroup the Stacked Columns

  1. Activate the worksheet Sheet1, highlight col(B)~col(G) and select Plot > Bar, Pie, Area: 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. 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
  4. Click OK to close the dialog. Select Graph: Rescale to Show All from the main menu to rescale the layer. You will get the graph as below:
    Grouped Stacked Column M2 01.png

Add Lables for Columns

  1. Click on the column, and in the popup mini toolbar, click the Show Data Labels under the Group tab to show the data labels on the columns.
    Grouped Stacked Column 03 2.png
  2. Click on the label, and in the popup mini toolbar, click the Label Source button and select Percent from the dropdown list.
    Grouped Stacked Column 03 3.png
    Please note, to change the labels of all columns together with mini toolbar, you need select the first plot in current layer group. In this stacked column graph, the bottom one within the first subgroup should be the first plot.
  3. Double-click on graph layer to open the Plot Details dialog. 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
  4. You will get the graph with labels as below:
    Grouped Stacked Column 03 4.png

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.
  2. Click OK button to close the dialog. Move the Legend box inside the layer. Click on the legend box, and in the popup minitoolbar, click on the button Data Plot Legend Translation Mode to select Long Name from the drop-down list.
  3. You will get the graph as below:
    Grouped Stacked Column 07a.png

Customize Column Colors

  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. Build Colors dialog opens.
  2. Select the first color, set Red, Green and Blue values to 165, 196 and 0, then click Replace button to add this color to the color list.
  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. Select all colors under color(6), 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 Build Colors.
    Grouped Stacked Column 02.png
  5. 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.
  6. Resize as needed, using the green selection handles. Finally, you will get the graph as the Summary shows.