Matlab的imagesc背景色 [英] matlab's imagesc background color

查看:1400
本文介绍了Matlab的imagesc背景色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用最新版的matlab.我正在使用带有喷射彩色图的imagesc命令来绘制矩阵.矩阵的背景值为零,并在图像中作为颜色条上的最低颜色(深蓝色)进行绘制.有没有一种方法可以使背景零值绘制为白色?

I'm using the newest version of matlab. I'm plotting a matrix using the imagesc command with the jet colormap. The background values of the matrix are zero and are plotted in the image as the lowest color on the color bar, which is dark blue. Is there a way to make the background zero values plot as white?

谢谢

推荐答案

 j = jet;
 j(1,:) = [ 1 1 1 ];
 colormap(j);
 imagesc(Img);

唯一的是,图像中映射到最低颜色的其他所有内容也会变成白色.

Only thing is that anything else in the image that maps to the lowest color is going to also come out white.

这篇关于Matlab的imagesc背景色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆