图像显示

load clown
image(X),colormap(map)
axis off
hold on
rect  = [ 150 40 80 70]
h = rectangle('position',rect);
rect =
   150    40    80    70

It's kind of hard to see this black edge of the rectangle outlining the eye on the right. Let me make it more visible by thickening it, and placing a thinner line inside.

set(h,'LineWidth',5)
h2 = rectangle('position',rect);
set(h2,'EdgeColor','w','LineWidth',2)

Let me adjust the linestyle instead of the width.

set(h,'LineWidth',2,'LineStyle','-')
set(h2,'LineStyle',':')

Making Markers Visible

Similarly, you can ensure that markers are visible on your plots by exploiting the separable colors for the face and edge.

 

 

delete([h h2])
hm = plot(60,125,'s')
set(hm,'MarkerSize',10,'MarkerEdgeColor','w','MarkerFaceColor','m')
hold off
hm =
          177

 

load clown
image(X),colormap(map)
hold on
xx = [150 230 230 150]';
yy = [40 40 110 110]';
hp  = patch(xx,yy,'g');

As you can see, the green patch I placed on top of the eye makes it impossible to see the covered region of the image. To get a hint at what lies underneath, I can change the transparency of the patch, by changing the transparency of the patch face.

set(hp,'FaceAlpha',0.2)
hold off

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值