boxplotCsub (boxplotC)

Revised version of boxplotC to allow coloring and subgroup plotting of boxplots.
Updated 2 Sep 2014

View License

This function provides some additional propoerties to the standard boxplot display. The basic old syntax of boxplot is retained, for compatibility.
The primary purpose is to allow for GROUPED boxplots, or subplots, of color coded boxplots on the same graph. This is useful for boxplot data comparrisons over multiple variables. It is also possible to overlay boxplots or to simply color different sets differently.

This routine allows for subgroup plotting of colorcoded boxplots (boxplotCsub) using the subfunction boxplotC (which allows for multiple colored box plots to be overlayed). In addition, standard line color and line width definition is available, as well as the filled option. This allows for color coding multiple box plots and overlaying. Download ZIP contains boxplotCsub with a revised boxplotC and boxutilC.

Reverse compatible with standard boxplot old (v.2002) syntax. While less obvious than the current syntax, looking at the examples should help clarify usage for those unfamiliar with boxplot.

Due to changes in boxplot in v.2011, the old BOXPLOT syntax help has been inclued, along with several examples.

BOXPLOTC is now obsolete, and superceded by this function.

Cite As

Brian Katz (2024). boxplotCsub (boxplotC) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: boxplotC, Hatched Fill Patterns

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Added warning for h_ticklabels call when unavailable. Added additional example showing default settings usage.

Revised help to be more readable.
Corrected bug when using RGB color definitions.

Small fonctionality, such as mean symbol. Fixes to various comments by users. As the BOXPLOT syntax has changed in recent versions of MatLab, I have copied the original help syntax as that is what is used here. BOXPLTCSUB now makes BOXPLOTC obsolete.

March 2011 revision includes the addition of mean symbol and variable widths.

Rev.2010 includes modification of box widths and control of overlap. Help modified to highlight these features.

Revised description only.