How can I fill the background with a color scale in function of a lineal model?
问题 I'm analysing an example of datavis in "The Functional Art " of Alberto Cairo (I recomend to you) In that book, there are this example And I try in R. In the bottom left graph (scatter plot) I use the data from the book, and i calculate the efectives militaries in function of population with lm(efect ~ pop) and the budget in function of population + efect And here is the question: How can I paint the background of the scatterplot with colorscale (gradient) where the color represent the value