image thumbnail

cbrewer : colorbrewer schemes for Matlab

version 1.1.0.0 (85.6 KB) by Charles
This function loads colormaps based on the color brewer schemes (http://colorbrewer2.org/)

19.6K Downloads

Updated 18 Sep 2015

View License

This function produces a colorbrewer table (rgb data) for a given type, name and number of colors of the colorbrewer tables. For more information on 'colorbrewer', please visit: http://colorbrewer2.org/

The tables were generated from an MS-Excel file provided on the website
http://www.personal.psu.edu/cab38/ColorBrewer/ColorBrewer_updates.html
This function also allows to use a variable number of colors for each colortable by interpolating the RGB indices
Based on the original data, there is only a certain number of colors available for each color scheme. When 'ncol' is larger then the maximum number of colors originally given, an interpolation routine is called (interp1) to produce an "extended" colormap.

To see the various colormaps available according to their types and names, simply call: cbrewer()
This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/).

Cite As

Charles (2021). cbrewer : colorbrewer schemes for Matlab (https://www.mathworks.com/matlabcentral/fileexchange/34087-cbrewer-colorbrewer-schemes-for-matlab), MATLAB Central File Exchange. Retrieved .

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

Community Treasure Hunt

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

Start Hunting!