Use of discrete colors in contourf and pcolor with colorbar

版本 1.1.0.0 (2.8 KB) 作者: Makarand
To set specific colors to the filled contours and pcolor plots and then to set the correct colorbar.
1.4K 次下载
更新时间 2010/10/18

查看许可证

There are three three files
Recolor_pcolor.m , Recolor_contourf.m and colorbar_levels.m
The Recolor_pcolor/Recolor_contourf functions re-assign the specific colors to specific levels. The required colormap must be assigned to the pcolor/contourf plots before calling this function. The number of colors in the colormap must be one plus the length of levels.
While making the contourf plot make it on [min(data) Levels] levels. In addition to that keep max(Levels) <max(data)
After plotting pcolor set the caxis on bounds [min(data) max(Levels)]
All comments are welcome.
Thanks
Mak

引用格式

Makarand (2024). Use of discrete colors in contourf and pcolor with colorbar (https://www.mathworks.com/matlabcentral/fileexchange/28073-use-of-discrete-colors-in-contourf-and-pcolor-with-colorbar), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2008a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Colormaps 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.1.0.0

made little flexible two of the programs

1.0.0.0