ggplot2 two layers plot, define x and y lim for geom_abline -


i using ggplot2 plot graphs, basic aim is: graph has 2 layers, lower layer (scatter plot) use data gathered public database, , add data study on top of it. added regression line data. can have brief idea of have picture: enter image description here problem that, due different dimensions of 2 data sets, regression lines long (full range), makes picture strange. want define x , y axis layer of data, however, can not reach this.

for regression, use geom_abline define slope, intercept, etc, instead of using geom_lm, see can take argument fullrange = false.


Comments

Popular posts from this blog

php - Autoloader issue not returning Class -

java - How to put two numbers separated by a space into two different arrays -

c++ - Why am i getting wrong values when performing PE base relocation? -