title: R: display (g)lm fit as colour coded image / contour plot
body: <p>I am on the lookout for a function in R that would display a bivariate (general) linear model fit (<code>fit=lm(z~x+y)</code>) as a <code>levelplot</code> or <code>contourplot</code>, whereby the fitted values as well as the actual data points are colour coded.</p>
  
  <p>The final result I would be looking for would be something like this
  (made this one in Mathematica, but I am looking for an R solution now)</p>
  
  <p><img src="https://i.stack.imgur.com/H0XnO.png" alt="enter image description here"></p>
  
  <p>Does anybody have any idea whether there is already a function out there somewhere that does something like this? </p>
  
  <p>EDIT: in the meantime I found a solution - see below!</p>