Modifying colourmap to suit needs
1 次查看(过去 30 天)
显示 更早的评论
Hello all,
Just wondering if its possible to modify the colourmap, to have it using the gray scale, but have the range of colours between 0 and 1, i.e. 0 being white and 1 being black, or vice versa.
if so, how?
Thanks!
0 个评论
回答(1 个)
Steven Lord
2020-4-14
Just flip the colormap.
figure
peaks
colorbar
colormap gray % effectively equivalent, due to how colormap works, to colormap(gray)
title('Normal')
figure
peaks
colorbar
colormap(flip(gray))
title('Flipped')
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colormaps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!