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                     
 

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

Last Update: 8/22/2018

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.

Note: Since Origin 2017, Double Y plot with one column and one line, or Double Y with two column bars can be plotted directly from Plot menu.

DoubleY from sheet.gif

How to Add New Data to Right Y Axis in Existing Graph

  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.
      Drag to doubleY.gif

How to Move One plot to Right Y Axis

  1. Origin 2019 added context menu in Object Manager to move a plot to 2nd Y or other layers.
    • Move to rightY.gif
  2. 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.
  3. In Origin 2017 Sr0 or earlier, there are following ways
    • Follow the steps in How to Add New Data to Right Y Axis in Existing Graph section to add a right Y axis layer and add data in. 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.
  4. Click OK button.
  5. You may need to click Rescale to show All (Ctrl+R) with each layer active to show all plots in both layers.
  6. 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.