How to construct a scatterplot with regression line that adjusts for other covariates? I am attempting to produce a scatterplot with a regression line whose intercept & slope are adjusted to account for another covariate in the model. (I understand that the data points don't change, just the intercept & slope of the regression line.)
So far, I have had no problem creating the scatterplot/regression line when there is only one predictor:
original analysis:
test7 <- lm(outcome1 ~ predictor1, data=dataset)
summary(test7)

corresponding plot:
 plot7 <- ggplot(dataset, aes(x=predictor1, y=outcome1)) +
      geom_point(shape=19, alpha=1/4) +
      geom_smooth(method=lm)

However, I would like to create a similar scatterplot/regression line that corresponds to the following analysis:
test8 <- lm(outcome1 ~ predictor1 + predictor2, data=dataset)
summary(test8)

The following plot printed, but I'm not sure if it is correct:
plot8 <- ggplot(dataset, aes(x=predictor1 + predictor2, y=outcome1)) +
  geom_point(shape=19, alpha=1/4) +
  geom_smooth(method=lm)

Is this the way to make the adjustment to the regression line intercept & slope? Or is there another way?
 A: One way to account for (or "control for") a covariate in a regression is to "take it out of the model" by regressing all other variables against that covariate and retaining only the residuals from those regressions.  See https://stats.stackexchange.com/a/46508/919 for an illustrated explanation and https://stats.stackexchange.com/a/113207/919 for a more theoretical (geometric) account.
Intuitively, we remove all variation in the outcome that can be associated (in a specified way) with the covariate and then study how what remains of the outcome is associated with what remains of the other explanatory variables.
This is easily done.
Let's begin with a dataset in which outcome depends on two variables predictor1 and predictor2, as in the question:

As always, we may plot the outcome against a single regressor (here predictor1).  We may, if we wish, conduct a univariate regression simply by ignoring the other regressor(s):

The line is the Ordinary Least Squares (OLS) fit, computed in R as
fit.1 <- lm(outcome ~ predictor1, data=X)

To control for--that is, understand the effect of including--another covariate, model the outcome against that covariate and plot the residuals of that model against the regressor:

The calculations in R required two (univariate) OLS regressions:
fit.2 <- lm(outcome ~ predictor2, data=X)
X$residual2 <- residuals(fit.2)
fit.12 <- lm(residual2 ~ predictor1, data=X)

The change in slope between the last two figures was possible due to multicollinearity of the predictors: that was apparent in the first figure, whose points exhibit a correlation of about $-0.75.$
This approach is consistent with the ideas behind Added Variable Plots (aka Partial Regression Plots), but to make it comparable to the original (univariate) scatterplot, I have not "taken out the effect of predictor2 on predictor1".  When that's done (with yet one more application of univariate OLS), the plot is more abstract but gives an even clearer picture of the relationship between outcome and predictor1 after controlling for predictor2:

The R code to produce this final figure begins
X$residual1 <- residuals(lm(predictor1 ~ predictor2, X))
ggplot(X, aes(x=residual1, y=residual2)) +

(and the rest is just cosmetic).

People have contributed several R packages to automate the construction of added-variable plots.  For the current offerings search CRAN.
References
Montgomery, Peck, and Vining, Introduction to Linear Regression Analysis, Fifth Edition (2012): section 4.2.4.
Mosteller and Tukey, Data Analysis and Regression, A Second Course in Statistics (1977): section 12C, "Graphical fitting by stages."
