Updated Oct 25, 2020

## Environment

### Software

How do I display a line parallel to the X axis at a constant Y value on my DIAdem plot?

Follow the steps below to manually generate a graph from example data, and then add a constant line to the graph:

1. Go to your report tab

2. Add a Simple 2D Axis System to the report by clicking the 2D Graph icon, clicking on the Simple 2D Axis System, then dragging your cursor into the report window.​ 3. Open the Data Portal and select the data you would like to plot. for this example we selected Noise_1 from DIAdem's example data. Drag this data into the Simple 2D Axis plot.

4. To add a line or curve, right-click the 2D Axis Plot » Display.

5. Select New Entry 6. Select Curve Parameters

7. To generate a constant line, select Constant from the left hand menu, and type the desired valueinto the field labeled X-constant. Click OK until you are back at the main graph. 8. You can now view the constant line on your graph. Follow the steps below to programmatically generate a graph from example data, and then add a constant line to the graph:

1. This section of the code creates the Plot
Call GraphObjNew("2D-Axis","2DAxis1")
Call GraphObjOpen("2DAxis1")
Call GraphObjNew("2D-Curve","New_Curve") 'Creates a new curve
Call GraphObjOpen("New_Curve") 'Opens the curve object
D2CChnXName = "EXAMPLE/Time"
D2CChnYName = "EXAMPLE/Speed"
Call GraphObjClose("New_Curve")
Call GraphObjClose("2DAxis1")
Call PicUpdate

1. This section of the code creates a new constant curve, which is parallel with the X axis
call GraphObjOpen("2DAxis1")
Call GraphObjNew("2D-curve", "Constant Y")
Call GraphObjOpen("Constant Y")
D2CCurveType = "Constant"
D2CConstXName = "NOVALUE"
D2CConstYName = "32"
D2CurveColor = "green"
Call GraphObjClose("Constant Y")
Call GraphObjClose("2DAxis1")
Call PicUpdate

1. This section of the code creates a new constant curve, which is parallel with the Y axis
call GraphObjOpen("2DAxis1")
Call GraphObjNew("2D-curve", "Constant X")
Call GraphObjOpen("Constant X")
D2CCurveType = "Constant"
D2CConstXName = "30"
D2CConstYName = "NOVALUE"
D2CurveColor = "red"
Call GraphObjClose("Constant X")
Call GraphObjClose("2DAxis1")
Call PicUpdate

If you run the code above you should see the following plot in the DIAdem report: 