6.7.10 Variable Column Width

Summary

Origin allows you to specify a dataset to control column/bar width. When the Scaling Factor is 0, the dataset values determine bar width in terms of X axis scale values. Variable Column Width 07.png

Minimum Origin Version Required: Origin 2015 SR0

What will you learn

This tutorial will show you how to

  • Plot a stack column graph
  • Set the width of column with a variable
  • Customize the axis ticks and tick labels

Steps

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

  1. Open the Tutorial Data project and browse to folder Variable Column Width in Project Explorer.
  2. Activate the workbook Book3A, highlight col(F), col(A) and col(B) and select Plot > Basic 2D : Stacked Column from menu to plot a stacked column.
    Variable Column Width 01.png
  3. Double-click on the plot to open the Plot Details dialog. Click the Group tab then click the button Button browser.png to open the Increment Editor. Select two custom colors as Fill Color.
    Variable Column Width 02.png
  4. Go to the Spacing tab, select Col(C): "w" as Width (in %) and set Scaling Factor to 0. After clicking Apply, it will be displayed as '<0=Use X Unit> .
    Variable Column Width 03.png
  5. Go to the Label tab, set Position to Center and select Col(C): "w" from the Label Form drop-down list.
    Variable Column Width 04.png
  6. Click OK to close the dialog. Double-click on the X Axis to open the Axis dialog.
    • Select Horizontal icon in the Scale tab, select By Custom Positions for Type and [Book3A]Sheet1!F"Product Share (%)" for Position.
      Variable Column Width 05.png
    • Go to Bottom page in Tick Labels branch, set Type to Tick-indexed dataset and Dataset Name to [Book3A]Sheet1!D"Item".
      Variable Column Width 06.png
    • Go to the Grids tab and check the Opposite check box under the Additional Lines branch for both Vertical and Horizontal
    • Click OK to close the dialog.
  7. Double-click on the Y axis title and change it to Unit Sales. Right-click the legend box and select Properties... from fly-out menu. Edit the legend to display on one line. The graph should look like the following:
    Variable Column Width 07.png