6.10.2 Grouped Box Chart with Color Indexed Data Points


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

Summary

Origin can be used to create grouped box plots from raw data with data points and distribution curves.

Box Chart Raw Data Indexed Data Plot Box chart with indexed data plot.png


Minimum Origin Version Required: 2015 SR0

What you will learn

This tutorial will demonstrate how to:

  • Create a grouped box plot from raw data
  • Add a data plot with indexed symbol color
  • Add and customize a distribution curve
  • Customize the table-axes

Steps

Creating the Box Plot from Raw 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".
    Box Chart Raw Data Indexed Data Plot Highlight columns.png
    Note: This tutorial is associated with the folder Grouped Box with Index Color DataPoint of the "Tutorial Data" project:<Origin EXE Folder>\Samples\Tutorial Data.opj.
  2. Activate the workbook Book11. Highlight col(C) - col(H), select Plot > Categorical: Grouped Box Charts - Raw Data.
  3. In the opened Plotting: plotgboxraw dialog, set the Group Number to 2, the 1st Group Row to Comments and the 2nd Group Row to Long Name. This will create a box chart with the column data arranged in three groups of two, with X axis row names derived from the Comments and the Long Names on the worksheet:
    Box Chart Raw Data Indexed Data Plot plotgboxraw.png
  4. Click the OK button. The grouped box chart from raw data is created with two grouping levels as shown below:
    Box Chart Raw Data Indexed Data Plot box chart1.png
  5. Click on the box, and in the popup mini toolbar, click the Box Type button to select Box[Right] + Data [Left].
    Box Chart Raw Data Indexed Data Plot box tab type.png
  6. To add distribution curves into the graph, double click the plot to open the Plot Details dialog. Expand the Layer1 option on the left panel and select the first plot under it.
  7. To add a Distribution Curve, on the Distribution tab, set Curve Type to Normal. Go back to Data tab, set Bins Alignment to Right to orient the curve.
    Box Chart Raw Data Indexed Data Plot data tab curve.png
  8. Click the OK button. The data points and distribution curves will appear on the graph as shown below:
    Box Chart Raw Data Indexed Data Plot box basic.png

Customizing the Boxes and Statistical Markers

  1. Double click on the any one of the boxes to re-open the Plot Details dialog.
  2. On the Group tab set both Border Color and Box Color to increment By One so each box in subgroup has a different color.
  3. Click the GUI Elements the browse button.png button on the Details section of Border Color. In the Increment Editor dialog that opens, click the first color and change it to be Red. Change the second color to Gray. Click OK.
  4. For Box Color row, set Increment to By One and Subgroup to Within Subgroup. Click the GUI Elements the browse button.png button on the Details section of the Box Color to open the Increment Editor dialog. Click the + button under Custom branch to open Colors dialog to define a custom color. Set RGB values in Red, Green, Blue boxes on bottom right to be 255, 51 and 51, and click OK to close dialog.
    :Box Chart Raw Data Indexed Data Plot custom colour.png
  5. Do the same for the 2nd color. Set Define RGB value to be 143, 143 and 143, and click OK to close dialog. Then click OK to close Increment Editor dialog and apply settings.
  6. This step is to customize the descriptive statistic markers whether to show on the plot such as the 99%, 1%, Max and Min marks.
    Go to the Percentile tab, and set the Edge Color to White and click Apply button. Since background of the graph is also white, Max, Min, 99%, 1% will look like disappeared in graph.

    On Percentile tab, users can also hide a Marker by setting the Type as None(the last shape) in the dropdown list.

  7. On the Lines tab set the Color for the Caps to Gray and Median Line to White.
    Click OK. The plot should appear as shown below:
    Box Chart Raw Data Indexed Data Plot box chart2.png

Customizing Data Symbols and Distribution Curves

  1. Double click any box in the graph to open the Plot Details dialog.
  2. On the Symbol tab. Set the Size to 5, the Shape to 2 Circle and the Interior to Open.
  3. Click the Edge Color button, go to By Points sub-tab, under Color Options radio box, select Col(B): "Machines" under the Indexing dropdown list. The symbol's edge colors will be indexed to column B. All symbols with Machine value A386 will be one color and the ones with C334will be a different color:
    Box Chart Raw Data Indexed Data Plot Symbol Color.png
  4. Reopen the Color Chooser again for Edge Color, the edge color has been indexed to Col(B), click the yellow pen after selected Color List to open the Increment Editor dialog. In this dialog, set the first two Color Values as Blue and Dark Cyan. Click OK button to close the editor and click Apply bottom to apply the symbol color.
    Box Chart Raw Data Indexed Data Plot Color List.png
  5. To customize the distribution curve color, on the Distribution tab, set the Distribution Curve Color to Gray. Click OK to close the dialog.
    Box Chart Raw Data Indexed Data Plot box basic2.png

Customizing the Axes

For grouped plots support multi-row tick label tables. The corresponding axis icons in the Tick Labels tab of Axis dialog starts from the last table row, e.g. Bottom 1, Bottom 2, ..., Bottom N. This means the first row from the bottom will correspond to Bottom1 and so forth.

  1. To move the tick label row with SEG 1, SEG 2 and SEG 3 to the top X axis, click on the labels in this row, and in the popup mini toolbar, click the Move to Opposite button to move this row to the top.
    Tutorial Grouped Box Axis 01.png
  2. Click on axis labels in the bottom axis table, and in the popup mini toolbar, click on the Add Row button to select Count to add a new table row with Count information.
    Tutorial Grouped Box Axis 01a.png
  3. Click the bottom table row again, in the popup mini toolbar, click on Add Row button to add a "Mean" row. Now, there are 3 table rows at bottom axis.
  4. Click the first bottom label row, and in the popup mini toolbar, set Fill Color to LT Gray; Click on the second bottom label row, set its color to Gray with the mini toolbar; Click on the third bottom label row to set its color to LT Gray; click on the top axis label row to set its color to LT Gray.
    Tutorial Grouped Box Axis 01b.png
  5. Double-click on a bottom table row to open the Axis dialog. With Ctrl key been pressed, select Bottom 1, Bottom 2, Bottom 3 in the left panel and go to Table sub-tab, clear the Inside Border box as below.
    Tutorial Grouped Box Axis 01e.png
  6. Click the Apply button. Select Top 1 in the left panel and go to Table sub-tab, clear all boxes except the Near Parallel Border box. Click OK button.
  7. Click on the bottom axis table to select all three rows, and in the popup mini toolbar, click Show Table Row Title button and then use the following button Table Row Title at End to put the title at the head of the rows.
    Tutorial Grouped Box Axis 01f.png
  8. Double-click on the axis labels of Y axis to open the Axis dialog again. For the Y Axis change to the following settings:
    • Scale tab (Vertical icon): Set Increment to 5000
    • Tick Labels tab >> Display tab (Left icon): Set Display to Scientific 10^3
  9. Click OK to close the dialog.
  10. Select Y axis title Range and press the Delete key to remove it.

Updating the Legend Object

  1. Right click the box chart legend and select Legend: Box Chart Components... to open the Enhanced Box Legend: legendbox dialog. Deselect all the components except for Data:
    Group Box Chart Legend 01.png
  2. Click the OK button. The legend will show only the data symbols. Double click the legend text to go into in-place edit mode. Delete the first row of the legend. Select and drag to move the legend object to a better location.
  3. To remove the black line around the legend, click the legend object, and in the popup mini toolbar, click Frame button to remove the frame.
    Group Box Chart Legend 02.png