title: Plot multiple-regression line in ggplot2
body: <p>Somewhat newbie question here. I'd like to use ggplot2 to plot my multiple regression model, but I ran into an error. I did some research on the forum before deciding to ask the community. The <a href="https://stats.stackexchange.com/questions/261776/r-plot-multiple-regression-line-with-confidence-intervals-with-ggplot2">original question</a> was posted in the wrong forum by mistake.</p>
  
  <p>I understand how to plot a simple linear regression:</p>
  
  <pre><code>ggplot(data, aes(x=X, y=Y))+geom_point()+ 
    geom_smooth(method='lm',formula=Y~X)
  </code></pre>
  
  <p>But when I tried to do it for multiple regression:</p>
  
  <pre><code>Model&lt;-lm(Y~x1*x2*x3*x4*x5, data, na.action=na.omit)
  
  ggplot(data, aes(x=X, y=Model))+geom_point()+ 
    geom_smooth(method='lm',formula=Y~x1*x2*x3*x4*x5)
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>Don't know how to automatically pick scale for object of type lm. Defaulting to continuous.<br>
        Error: Aesthetics must be either length 1 or the same as the data (209): x, y</p>
  </blockquote>