OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis                     
Skip Navigation Links
All BooksExpand All Books
Quick HelpExpand Quick Help
GraphingExpand Graphing

1.69 FAQ-194 How do I create a double Y axis graph?

Last Update: 5/9/2017

Plot double Y from worksheet

  1. From the worksheet, select both Y datasets.
  2. Choose Plot: Multi-Y: Double-Y, or select the Double Y Axis plot button from the 2D Graphs toolbar.
  3. If you want to change plot type. With each layer active, click line, scatter, line+symbol or Column button to change the plot type in the layer.

One Y data is plotted. How to add new Y data to right Y axis

  1. Choose Graph: New Layer (Axes): Right Y axis menu. A second layer is added with right Y axis showing. Note: The X axis has straight 1:1 relation with original layer.
  2. Add data to the newly added layer. There are three methods:
    • Go to the worksheet window, select the second dataset, return to the graph window, and choose Graph: Add Plot to Layer: Plot Type.
    • Alternatively, data can be selected and dragged from the worksheet and dropped to the graph layer.
    • Alternatively, you can double-click on either the layer 1 or layer 2 layer icon in the upper-left hand corner of the graph. The Layer Contents dialog will allow you to add or remove data into this layer.

Two Y data are plotted in same axis. How to move one plot to right Y axis

  1. Origin 2017 Sr1 added a new xfunction to move plot to new layer or another existing layer.
    • With graph window active, choose Window: Script Window
    • Run "laymplot -d"
    • Specify which plot you want to add to right Y axis. Note: set Target Layer as 0 to move to new layer. Also check Layer Seting: Independent Y Linked X. Rescale Layer as Source and Target. This will make sure the right Y axis layer has same x scale as layer 1. Also both layer are rescaled to show all data. See this blog for detailed steps.
  1. In Origin 2017 Sr0 or earlier, there are following ways===
    • See the steps in "One Y data is plotted. How to add new Y data to right Y axis" section of how to add new right Y axis layer and how to add data. Then remove the the extra plot from layer1.
    • Using Extract to Layers tool
      • With graph active, click Extract to Layers toolbar button, which is on Graph toolbar. Set both the Number of Rows and Number of Columns to 1.
      • After graph is created, choose Graph: Layer Management menu
      • On Link tab, select Layer2 on the left. set Link To as 1 and also set X Axis Link as Straight (1:1). Click Apply button.
      • Still with Layer2 selected on the left, go to Axes tab. Uncheck Axis, Title, and Tick Label checkboxes under Bottom and Left nodes. Check them under Top and Right nodes.
  2. Click OK button.
  3. You may need to click Rescale to show All (Ctrl+R) with each layer active to show all plots in both layers.
  4. Update legend as needed.

You can quickly create an XYXY graph from the Double-Y graph template. See the Notes section of Double Y Axis Graph.

Keywords:second, two, double Y, multi Y, multi X, link axis


© OriginLab Corporation. All rights reserved.