

Optionally, show Label and choose your Label Text. 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). Double-click on the X or Y axis to open the Axis dialog.Plot x and y data points using scatter () method. Initialize a variable, n, for number of data points.

Set the figure size and adjust the padding between and around the subplots. 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). To add a line to a scatter plot using Python's Matplotlib, we can take the following steps.

Make sure the graph window is active and select Insert: Straight Line to open the addline dialog.To set a different color for each point we pass a list of colors to the color parameter of the scatter() method. We’ll see an example, where we set a different color for each scatter point. 1.102 FAQ-621 How can I put a straight line to a graph at specified X or Y value?Īpart from simply drawing a line on your graph with the Line Tool, there are several methods for adding a vertical or horizontal "reference lines" to the graph at a specific axis value: Read: Horizontal line matplotlib Matplotlib scatter plot color each point.
