Skip to content
Prev 280123 / 398502 Next

Polygon

Please read the posting guide and provide a (small) reproducible example 
of your data.

The statement "...output does not seem good."  is not very useful. 
Please explain what you would like the polygon area to look like, and 
why you don't like the way it came out.  Links to posted images of the 
chart would help too.


<quote>
From: Komine <momadou_at_yahoo.fr>
Date: Mon, 12 Dec 2011 06:58:56 -0800 (PST)

Hi everybody,
I have a matrix with 3 columns (Date, MeanArea and SdArea). I want to 
draw a figure showing the variable MeanArea in terms of the Date. But 
instead to use the variable SdArea as bar error, I want to use ?polygon 
error?. I use this code but the output does not seem good. 
Poly<read.table("C:\\Users\\Momadou\\Documents\\AreaMonthly.csv",sep=";",dec=",",header=TRUE) 
Poly

y <-MeanArea
x <-SdArea
z <-Date

matplot(x,cbind(y,z),type="n")
polygon(c(x,rev(x)),c(y,rev(z)),col="grey50")
Thank you in advance