- Functions for a colormap which you like
- Complementary color will be defined automatically.
* Demo of Gabor and Gaussian Colormap Visualization below
** Template colormap, viridis, magma etc. is not equal to matplotlib's one.
```
%% Demo code
x = linspace(-pi, pi, 256);
[xx, yy] = meshgrid(x, x);
% G = fspecial('gaussian', 256, 20);
G = exp(-1*(xx.^2 + yy.^2)/2*(2^2));
G = G./max(G(:));
S = sin(xx*pi);
for i = 1:3 %% making R, G, B colormap
tcol = [0 0 0];
tcol(i) = .5;
subplot(3,2,2*(i-1)+1)
imagesc(G.*S); colormap(gca, polcmap(128, tcol));
colorbar; axis image; axis off
subplot(3,2,2*(i-1)+2)
imagesc(G); colormap(gca, wcmap(128, tcol));
colorbar; axis image; axis off
end
```
2018/02/02 R.Takeuchi
2018/10/16 - add some template colormap, see demo.m for checking usage
Citation pour cette source
Ryosuke F Takeuchi (2025). autocmap (https://fr.mathworks.com/matlabcentral/fileexchange/65936-autocmap), MATLAB Central File Exchange. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxCatégories
- MATLAB > Graphics > Labels and Styling > Color and Styling > Blue >
Tags
Remerciements
Inspiré par : Red Blue Colormap
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.
autocmap
autocmap/+acm
| Version | Publié le | Notes de version | |
|---|---|---|---|
| 1.2.0.0 | bug fix |
||
| 1.1.1.1 | typo |
||
| 1.1.1.0 | add some template colormap, see demo.m for checking usage |
||
| 1.1.0.0 | 2018/02/05 add additional demo and bug fix
|
||
| 1.0.0.0 |
