[R] Polygon function

Jim Lemon jim at bitwrit.com.au
Wed Aug 19 10:10:57 CEST 2009

Cetinyürek Aysun wrote:
> Dear all,
> I would like to plot credible interval for a function estimate in R. I
> would like to plot the credible intervals as shaded region using polygon
> function. Does anyone ever used that? I tried several times but I could
> not obtain the right figure.
> xis=sort(xi,decreasing=TRUE)
> plot(xi,fm)
> polygon(c(xi,xis),c(f05m,f95m))
> The above piece of code produces something else.
Hi Aysun,
Have a look at the dispersion function in the plotrix package.


More information about the R-help mailing list