Reverse the Colormap of Surf plot
111 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I'm constructing a surf plot using Location (logitude, latitude) and depth data. Following image is the 2D projection of my surf plot. Is there a way to reverse the colormap of my plot?
i.e. Highest values should be shown in Dark blue (instead of yellow) and lowest values should be shown in yellow (instead of blue).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/301623/image.png)
Thanks in advance!
0 comentarios
Respuesta aceptada
Tommy
el 26 de Mayo de 2020
Grab the colormap and flip it upside down:
f = figure;
surf(peaks(50))
colormap(f, flipud(colormap(f)))
colorbar
Más respuestas (0)
Ver también
Categorías
Más información sobre Colormaps en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!