1.102 FAQ-621 How can I put a straight line to a graph at specified X or Y value?

Last Update: 4/1/2020

Apart from simply drawing a line on your graph with the Line Tool Button Line Tool.png, there are several methods for adding a vertical or horizontal line to the graph at a specific axis value:

  • Make sure the graph window is active and select Insert: Straight Line to open the addline dialog. In this dialog, put the X (Type = Vertical) or Y (Type = Horizontal) value to the At value text box. There are options to format the line and label it.
  • Double-click on the graph's X or Y axis to open Axis dialog. Go to the Grids tab and check the Y or X edit box under the Additional Lines node and input a value.
  • Click inside the graph layer to select the layer and show the layer-level Mini Toolbar. Click on the Add Stats Reference Lines button to add one or more lines marking key statistics; or click More to open the Reference Lines dialog box (see next).
FAQ-621 layer level mtb.png
  • Double-click on the X or Y axis to open the Axis dialog. Click on the Reference Lines tab, enter an axis value or statistics (only in Origin 2018 and higher) to display the line (At Axis Value). Optionally, show Label and choose your Label Text.
    Statistical reference line.gif


You can display reference lines behind or in front of your data points. See Data Drawing Options.


Keywords:Reference Lines, vertical line, horizontal line