Hey everybody!
I used a training set of data points to create a linear regression (signal intensity as a function of substance concentration within samples), and applied the resulting formula on a test set of data points for a reverse prediction of the associated sample's substance content. Now I would like to showcase the data points of the training set, the regression line that visualizes the linear regression, and the data points of the test set all in a single diagram. The purpose is to show how all the data points scatter arround the ideal function of signal intensity versus substance concentration. I know how to plot the data points of the training set and how to create the regression line within the same plot. But how do I add the data points of the test set without them influencing of the creation of the regression line? The data points of the test set should be present and visible in the diagram, but the regression line should be solely a product of the data points of the training set. Also, I would like to highlight the data points of the test set in a different color than the other data points.
Thanks in advance!