powered by
Plots uncertainty bands with shading
ctPoly(x, y, ylow, yhigh, steps = 20, ...)
Nothing. Adds a polygon to existing plot.
x values
y values
lower limits of y
upper limits of y
number of polygons to overlay - higher integers lead to smoother changes in transparency between y and yhigh / ylow.
arguments to pass to polygon()
plot(0:100,sqrt(0:100),type='l') ctPoly(x=0:100, y=sqrt(0:100), yhigh=sqrt(0:100) - runif(101), ylow=sqrt(0:100) + runif(101), col=adjustcolor('red',alpha.f=.1))
Run the code above in your browser using DataLab