Build Custom Colormaps with Variable Resolutions
This function can be used to build your own custom colormaps.
the first input argument colors is a n X 3 matrix with each row
specifying the color.
the second argument is the resolution of the colormap default(300)
Example:
colors_mat = [1 0 1; 0 1 0];
[cmap]=buildcolormap(colors_mat,255);
% % try the output cmap:
im=imread('cameraman.tif');
imshow(im), colorbar
colormap(cmap) %will use the output colormap
Author: Vengatesan G
Thanks to M Sohrabinia for his original work.
http://www.mathworks.com/matlabcentral/fileexchange/40318-build-custom-colormaps
Citation pour cette source
Vengatesan (2024). Build Custom Colormaps with Variable Resolutions (https://www.mathworks.com/matlabcentral/fileexchange/47721-build-custom-colormaps-with-variable-resolutions), MATLAB Central File Exchange. Récupéré le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxCatégories
- MATLAB > Graphics > Formatting and Annotation > Colormaps > Green >
- MATLAB > Graphics > Formatting and Annotation > Colormaps > Purple >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
Version | Publié le | Notes de version | |
---|---|---|---|
1.1.0.0 | Changed the title. |
||
1.0.0.0 |