Select regression fit > Editor > Edit Regression Fit > Groups
Use to add, remove, or change the grouping variables on a scatterplot or matrix plot. To add a regression line to a graph, choose Editor > Add > Regression Fit.
Categorical variables for grouping: Enter up to three columns of grouping variables to fit a separate regression line for each group and display a legend.
Apply same grouping to other data displays: Check to update all data displays to use the same grouping variables as the fitted line.