The solution in this case would be to flip the values of the colormap, using the command:
colormap(flipud(hot)) Answer from MathWorks Support Team on mathworks.com
MathWorks
mathworks.com › matlabcentral › answers › 1679449-how-to-reverse-gradient-of-colormap-in-matlab
How to reverse gradient of colormap in Matlab? - MATLAB Answers - MATLAB Central
March 24, 2022 - I have the data below in Matlab: However, when I plot it, yellow is given to the values close to 1 and dark blue to the values close to 0. How can I reverse the order of the colorbar, so that yell...
MathWorks
mathworks.com › matlabcentral › answers › 1561461-changing-orientation-of-color-map
Changing orientation of color map - MATLAB Answers - MATLAB Central
October 11, 2021 - To reverse the colors, use fllipud() on the colormap. x = linspace(0,3*pi,200); y = (cos(x) + rand(1,200))*(-1); sizes = (10*x+0.01); cmap = flipud(cool(256)); % Get the row of cmap that corresponds to the y value. rows = round(rescale(y, 1, ...
MathWorks
mathworks.com › matlabcentral › answers › 614623-reverse-flip-values-in-the-colorbar-axis
Reverse/flip values in the colorbar axis - MATLAB Answers - MATLAB Central
October 15, 2020 - Hi, In the attached figure, I have reverse the values in the color bar i.e. red to be positive and blue to be negative. Please help me with this. I have tried flipud, but it changes the color pat...
MathWorks
mathworks.com › matlabcentral › answers › 54869-how-can-i-reverse-colormap-in-contourfm
How can I reverse colormap in contourfm? - MATLAB Answers - MATLAB Central
November 26, 2012 - I'd like to use the reverse of jet colormap in contourfm. contourfm seems to only accept standard string values for predefined colormaps. Sign in to comment. Sign in to answer this question. ... https://www.mathworks.com/matlabcentral/answers/54869-how-can-i-reverse-colormap-in-contourfm#answer_66592
MathWorks
mathworks.com › matlab › graphics › labels and styling › color and styling
gray - Gray colormap array - MATLAB
Get the gray colormap array and reverse the order.
MathWorks
mathworks.com › matlabcentral › answers › 2012452-reversing-the-colormap-turbo-color-range
Reversing the colormap turbo color range - MATLAB Answers - MATLAB Central
August 24, 2023 - In turbo colormap, blue represent low values in a range, and red represents high values. Is there any way to reverse this color bar and represent red for low values and blue for high values ? ...
Top answer 1 of 2
1
If you don't want to actually change the values of your data, you can simply fetch the colormap of the figure and invert it using flipud.
cmap = colormap(gcf);
colormap(gcf, flipud(cmap))
This will invert the colormap while leaving your original data untouched.
2 of 2
0
Changing V to -V on the call to figure 4 should do the trick:
figure(4);
r = pcolor(x, t, -V);
set(r, 'EdgeColor', 'none', 'FaceColor', 'interp');
MathWorks
mathworks.com › matlab › graphics › labels and styling › color and styling
parula - Parula colormap array - MATLAB
Get the parula colormap array and reverse the order.
MathWorks
mathworks.com › matlab › graphics › labels and styling › color and styling
jet - Jet colormap array - MATLAB
Get the jet colormap array and reverse the order.