shading (fill) the area between two lines

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

shading (fill) the area between two lines

AbouEl-Makarim Aboueissa-3
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]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: shading (fill) the area between two lines

Duncan Murdoch-2
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]]
>
> ______________________________________________
> [hidden email] 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.
>

______________________________________________
[hidden email] 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.