Komine wrote:

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

Hi Komine,
I think you want a dispersion band around y (Mean Area). Without the data I really can't tell, but the dispersion function in the plotrix package using type="l" and fill=<some color> may do what you want.

Jim

______________________________________________
R-help@r-project.org mailing list
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 via email to