By |Published On: January 5, 2023 at 5:16 am PST|Last Updated: January 5, 2023 at 5:16 am PST|

Linear Regression and highlight data points outside the Confidence Intervals

This tutorial will show how to use the TechGraph Editor to fit a linear regression line and the 95% confidence Interval to a set of XY data.  It also shows how to “highlight” data points that are outside the Confidence Intervals by a different color.  Shown below are the settings in the Data Table and the Edit Chart used to create this chart.

Data Table – Sample data can easily be changed or replaced by pasting data from an external worksheet
  • Graph Type is Scatter.
  • X Data Type is Number.  X Data column contains the X values.
  • Graph A series is set to Scatter and it contains the Y values.
  • Graph B series contains the Y values that you want to highlight.  In this example, the Y value in Graph A located on row 8 is outside the Confidence Interval.  This Y value is copied to row 8 in Graph B.  The Graph B marker is set to the same type and size as Graph A marker except color.

Note:   Click on the “Help” button on the toolbar to find out how to edit, delete, copy and paste in the Data Table.

Edit Chart – A set of icons (Titles, Settings, X Axis, Y Axis, Curves and Error Bars) to change the settings and appearance of the chart.        

Settings  – specify the color, marker type and size for Graph A and Graph B marker.         

  •  Click on the “Royal Blue” (Graph Style) to show the marker Style for Graph A pop-up.   You can change the Color, Type and Size for Graph A marker.   Click on Apply to save the changes.
  •  Click on the “Crimson” (Graph Style) to show the marker Style for Graph B pop-up. You can change the Color for the B marker but the Type and Size should match the Graph A marker.  Click Apply to save the changes.

     X Axis 

  • Enter values in Minimum, Maximum and Major Div to set the X Axis scale and divisions. Leave these values empty for automatic scaling.

     Y axis

  • Enter values in Minimum, Maximum and Major Div to set the Y Axis scale and divisions. Leave these values empty for automatic scaling.

     Curves & Error Bars       

  •  Click on “Linear” (Curve Fit) for Graph A to show the Curvefit Selection for Graph A pop-up.  For this example, “Linear” is selected from the Selection list. Checkbox for Show Confidence Curves is checked.  “95%” is selected from Confidence Level list.  Click on Apply to save the changes.
  • Click on Curve Style for Graph A to show the Curve Style for Graph A pop-up.  “Black” is selected for the linear Curve color. “Black” is  selected for the Confidence color.  Use the Thickness and Line Type selection list to change the line style. Click on Apply to save the changes

    Edit Chart Toolbar Options

  •  Print Chart prints your chart.
  •  Download Image downloads your chart as an SVG(Scalable Vector Graphics) file or image file(PNG, JPEG, TIF, PDF).
  •  Drawing Objects customize your chart with labels, lines, arrows, circles, images, and logos.
 Getting Started: