AbouEl-Makarim Aboueissa
2018-Jan-12 00:43 UTC
[R] shading (fill) the area between two lines
Dear All: I am trying to shade the area between the two lines; *line 1* and *line 2*. You can use this code as an example. x100<-c(-1,1,2,3,4,5,6,3) y100<-c(4,5,3,1,4,4,2,-1) plot(x100,y100) *##### line1* abline(a=-(Beta0-1)/Beta[1,2], b=-Beta[1,1]/Beta[1,2], lwd = 3, col="skyblue", lty=3) ##### lty=3, *##### line 2* abline(a=-(Beta0+1)/Beta[1,2], b=-Beta[1,1]/Beta[1,2], lwd = 3, col="skyblue", lty=3) ##### lty=3, thank you very much for your help with thanks abou ______________________ *AbouEl-Makarim Aboueissa, PhD* *Professor of Statistics* *Department of Mathematics and Statistics* *University of Southern Maine* [[alternative HTML version deleted]]
On 11/01/2018 7:43 PM, AbouEl-Makarim Aboueissa wrote:> Dear All: > > > I am trying to shade the area between the two lines; *line 1* and *line 2*.The help page for polygon() gives some examples of this. Duncan Murdoch> > > > You can use this code as an example. > > > x100<-c(-1,1,2,3,4,5,6,3) > y100<-c(4,5,3,1,4,4,2,-1) > > plot(x100,y100) > > > *##### line1* > > abline(a=-(Beta0-1)/Beta[1,2], b=-Beta[1,1]/Beta[1,2], lwd = 3, > col="skyblue", lty=3) ##### lty=3, > > *##### line 2* > > abline(a=-(Beta0+1)/Beta[1,2], b=-Beta[1,1]/Beta[1,2], lwd = 3, > col="skyblue", lty=3) ##### lty=3, > > > > > thank you very much for your help > with thanks > abou > ______________________ > > > *AbouEl-Makarim Aboueissa, PhD* > > *Professor of Statistics* > > *Department of Mathematics and Statistics* > *University of Southern Maine* > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >