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

Last Update: 1/6/2019

Apart from simply adding a drawn line to the graph, there are three user-interface methods for adding a a vertical or horizontal line to the graph at a precise location:

  • 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 Additional Lines node and input a value.
  • 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

Note: Some methods available only with later versions of Origin.

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

Keywords:Reference Lines, vertical line, horizontal line