Adjusting Contour Colors for a Value

5 vues (au cours des 30 derniers jours)
AeroLad
AeroLad le 21 Nov 2020
Commenté : AeroLad le 29 Nov 2020
Hi,
I have been trying to change my contour colours for a set of four subplots so that they match (i.e the 10,000 line occurs at the boundary of the same coulour)
I tried rather unsucessfully to manually change the boundaries for the color map for each subplot as follows:
contour(A1,A2,A3,'ShowText','on','Fill','on','LevelStep',200,'TextStepMode','manual','TextStep',400)
% cbax = axes('visible', 'off');
% caxis(cbax4, [9200, 10600]);
% h4 = colorbar('peer',cbax4, 'location', 'southoutside',...
% 'AxisLocation','in','position', [0 0 0 0] )
Any help would be appreciated. Thanks!

Réponse acceptée

Vimal Rathod
Vimal Rathod le 29 Nov 2020
Hi,
You could make sure the same color comes during the ranges by specifying levels of the contours manually.
[X,Y,Z] = peaks;
% numbers in the brackets specify the levels.
f1 = contourf(X,Y,Z,[0.2 0.4 0.6 0.8 1 1.5 2])
Assigning levels properly would help you get specific color at that level.
Refer to the following links to know more about contour properties.
  1 commentaire
AeroLad
AeroLad le 29 Nov 2020
Ahh. Perfect. Thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Contour Plots dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by