How to make the pressure contours colorbar concentration the same for all values

How to make the Cp reference colour the same for this coding with different Cp values? Because when I run this coding for the other half of the tail, the Cp colour at 0.008 is in orange colour. How to make the Cp contour constant?
% Make x-y mesh grid
x = [-4.2195;
-5.7195;
-7.2195;
-8.7195;
-2.7195;
-4.2195;
-5.7195;
-7.2195;
-8.7195;
-1.2195;
-2.7195;
-4.2195;
-5.7195;
-7.2195;
-8.7195];
y = [6.3;
6.3;
6.3;
6.3;
4;
4;
4;
4;
4;
1.7;
1.7;
1.7;
1.7;
1.7;
1.7];
pressure = [0.007422;
0.005551;
0.003788;
0.003951;
0.008568;
0.004381;
0.003754;
0.003587;
0.003588;
0.006594;
0.003985;
0.003538;
0.00387;
0.003596;
0.003762];
[xq,yq] = meshgrid(...
linspace(min(x),max(x),170),...
linspace(min(y),max(y),170));
% Interpolate using "griddata" function
pq = griddata(x,y,pressure,xq,yq,'cubic');
% Visualize the result
figure
%surfc(xq,yq,pq)
surfc(xq,yq,pq, 'EdgeColor','none ')
xlabel('x','FontSize',16)
ylabel('y','FontSize',16)
c = colorbar;
c.Label.String = 'Cp';
c.Label.FontSize = 16;
c.Limits = [0 0.012]

 Respuesta aceptada

use caxis() to set the color settings to absolute values.

2 comentarios

Sorry, can you help me to add it in my coding because I'm not sure how to do it.

Iniciar sesión para comentar.

Más respuestas (2)

This is the other half. But the colour shade at the Cp colorbar changes. So, I couldnt compare the pressure distribution.

Etiquetas

Preguntada:

el 3 de Jun. de 2022

Respondida:

el 3 de Jun. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by