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

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -