[R] Polygon
Jim Lemon
jim at bitwrit.com.au
Tue Dec 13 12:12:45 CET 2011
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
More information about the R-help
mailing list