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: 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
Post a Comment