Make Stacked Graph with Same Axis Unit Length

Origin has a layer level option linking axis length to its scale so that axis will have the same unit length. This post will help you to go one step further, because in categorical data, we only want to link one of the axis (Y axis) to its scale, while keep X as it is for it’s just categories.

If you want to walk through the steps with me, please download this sample data.

The raw data shows as below:


Highlight all four columns and plot a column graph. You can finish most of the customization since Origin’s batch plotting can duplicate the graph with new data. Here are some important changes that you need to make:

  1. Open the Axis Dialog for Y axis and set its Rescale mode to that when new data be used, the Y axis range can be adjusted accordingly.
  2. Hide the X axis tick and labels because only one of the three graphs needs it.
  3. Right click in white area and choose Add/Modify Layer Title and enter %(1Y, @WS). Right click it and choose Properties and click on the Programming tab. Set Link to (%,$), Substitution Level to 1. This will convert the subsitution notation %(1Y, @WS) into sheet name.
  4. In Plot Details dialog, choose Layer1 on left panel, go to Size tab and change Scale Elements to be Fixed Factor with value so that everything will not be scaled with layer size changing.
  5. Right click graph window title and select Duplicate (Batch Plotting), set Batch Plot with = Sheet. Select the other two sheets and click OK.
  6. Update the color for the duplicated graphs first since they uses the same color setting as the first one.
  7. Go to menu Graph: Merge Graph Windows and set it as a 3*1 layout. Check Set Layer Height by Common Scale checkbox so that each layer height will adjust proportionally based on the range of axis.
  8. However, from the preview we see that the Test-1 layer is on the top instead of bottom. That’s because this tool by default place the graphs based on the list in Graphs. Use the Move Up/Move Down buttons beside Graphs to arrange windows in the order Graph7, Graph6, Graph 5, then click the OK button.
  9. Turn the X axis tick and label back on the bottom axis. You will got your graph as below:


You can look at the expected graph under Result folder in the opj you downloaded.

About S Z

Male, single, alive.

View all posts by S Z →

One Comment on “Make Stacked Graph with Same Axis Unit Length”


メールアドレスが公開されることはありません。 が付いている欄は必須項目です