I have the following code for the minimum and maximum of my prediction interval> y.down=lines(x[x.order], set1.pred[,2][x.order], col=109) > y.up=lines(x[x.order], set1.pred[,3][x.order], col=109)domain=min(x):max(x) polygon(c(domain,rev(domain)),c(y.up,rev(y.down)),col=109) It doesnt seem to shade the right region, it gives me a trapezoid. Any help? Thanks! [[alternative HTML version deleted]]
Hello, It is not a reproducible example. Regards, Pascal Le 12/09/13 14:38, Jonathan Zhang a ?crit :> > I have the following code for the minimum and maximum of my prediction interval > >> y.down=lines(x[x.order], set1.pred[,2][x.order], col=109) >> y.up=lines(x[x.order], set1.pred[,3][x.order], col=109) > > domain=min(x):max(x) > > polygon(c(domain,rev(domain)),c(y.up,rev(y.down)),col=109) > > It doesnt seem to shade the right region, it gives me a trapezoid. > > Any help? Thanks! > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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. >
On Sep 12, 2012, at 10:38 PM, Jonathan Zhang wrote:> > I have the following code for the minimum and maximum of my prediction interval > >> y.down=lines(x[x.order], set1.pred[,2][x.order], col=109) >> y.up=lines(x[x.order], set1.pred[,3][x.order], col=109)You do not understand what the lines function is doing:> y <- lines(1:3, 1:3) > yNULL> > domain=min(x):max(x) > > polygon(c(domain,rev(domain)),c(y.up,rev(y.down)),col=109) > > It doesnt seem to shade the right region, it gives me a trapezoid. > > Any help? Thanks! > > [[alternative HTML version deleted]]David Winsemius, MD Alameda, CA, USA