Use of discrete colors in contourf and pcolor with colorbar

Versione 1.1.0.0 (2,81 KB) da Makarand
To set specific colors to the filled contours and pcolor plots and then to set the correct colorbar.
1,4K download
Aggiornato 18 ott 2010

Visualizza la licenza

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

Cita come

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. Recuperato .

Compatibilità della release di MATLAB
Creato con R2008a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Colormaps in Help Center e MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.1.0.0

made little flexible two of the programs

1.0.0.0