How to adjust the greyscale colorbar to cover a large range?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I think this question might have been asked previously but I have not been able to find any threads to this.
I have a bathymetry pcolor plot and I am trying to adjust the scales of the colorbar by using the colormap as the depth values ranged from -30 to 0.5. At this stage, I am trying to see more details on the -5 to 0.5 and have less detail on the -30 as most of my bathymetry are between the depths of -5 to 0.5. At this stage, all my areas that is less than -5 is in the dark scale.
Any suggestions will be great.
Thank you
0 commentaires
Réponses (1)
Walter Roberson
le 4 Fév 2011
Ncol = 128; fliplr(-logspace(0,log10(31.5),NCol))+1.5
This would distribute roughly the first 55 of 128 positions below -5 using a logarithmically decreasing spacing as it gets towards 5.
I would guess that you would prefer to have even fewer values below -5; in order to do that you will have to give us an idea of the sort of spacing you would consider acceptable.
For example, there are always possibilities such as:
Ndark = 20; t1 = linspace(-30,-5,Ndark+1); t2 = linspace(-5,5,128-Ndark); intensitybounds = [t1(1:end-1) t2];
which is plain linear from -30 to -5 and then plain linear with higher density from -5 to +5.
0 commentaires
Voir également
Catégories
En savoir plus sur Colormaps dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!