File Exchange

image thumbnail

Plot confidence intervals

version 1.0 (1.02 KB) by

Plots a shaded region between specified lower and upper limits



No License

Plots shaded confidence intervals. Uses the matlab fill function, rather than area. This allows for multiple confidence plots to be overlayed for statistical comparison.

Comments and Ratings (24)

Jan Motl

Jan Motl (view profile)

The function could be returning a handle to the fill polygon to make it easier to adjust the properties of the fill.

Sanjay Yen

Laura Steeves

Sohail Ahmed


Scott (view profile)


Amit (view profile)

Thank you!!

We can shade the graphs by adding these two commands after fill operation.

camlight; lighting gouraud;

Roland Pasto

Thank you for your contribution ! You saved me a lot of search time. I only have one suggestion to improve your function : you could add a new input argument to control the "EdgeColor" of the CI to avoid using the default edge color.

Roland Pasto


sommar (view profile)

Great Work


I could get two sets of bands on the same graph by just defining upper and lower each as two column matrices. But somehow I just can't get them in different shades. Any advice?


Yes, it is right, what I looked for. Thanks

Bob Smith

Nice, but ...

How do you get the transparent overlays that you've got in the example?

Jens Liebe

Excellent, worked like a charm

Ryan Walker

No hassle, works great - useful also for drawing diagrams with filled shapes


Perfect ..

Andrew Brampton

Worked first time and without hassle. thanks

yiming wang

quite useful, especially for multiple plots.

Anders Engström

Excellent work! Just what I needed

Friedhelm Steinhilber


Mohammad Zubayer Karim

I was looking fr a way to plot a band which shows the range of gait data and this one helped me.

MATLAB Release
MATLAB 6.5 (R13)

Inspired: ciplot(lower,upper,x,colour,alpha)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video