h = findobj(gca,'Type','line')
set(h,'Color','r')
如果是柱形图用
h = findobj(gca,'Type','patch');
set(h,'FaceColor','r')
可以在第二个图的edit菜单 中figure properties中修改line color
b=double(b);这句何用,如果你的图像数据是uint8类型的,转化要用im2double!
其次,你的imshow和imhist两个函数要分开画在两个figure上会好点!