sinogyang的个人博客分享 http://blog.sciencenet.cn/u/sinogyang

博文

matlab pcolor绘图时text字体被图片遮挡的问题

已有 10630 次阅读 2012-6-7 09:08 |个人分类:Matlab|系统分类:科研笔记| MATLAB, text, pcolor, 字体遮挡

今天发现在某些时候(具体什么时候我还真没有发现规律),在pcolor图上添加字体会被图片本身遮挡住而显示不出来。遂在网上寻找方法,发现相同的问题和解决方案。分享之。

故障现象:如果键入命令如下
pcolor(peaks)
shading interp
text(30,30,'hello world');
在图中不能看到‘hello world’字样,那么恭喜你,有解决办法了,如下;
change text(30,30,'hello world'); to text(30,30,1,'hello world');
原因:pcolor is really a surf plot viewed directly above, therefore you need to give your text a vertical offset so that it appears to be in front of the image.
原来是需要要给text的内容所在的层的一个定义,就像PPT中的“置于顶层”那样的命令一样。
Bingo!
摘自:http://www.mathworks.com/matlabcentral/newsreader/view_thread/298118

https://wap.sciencenet.cn/blog-228329-579491.html

上一篇:matlab:print命令保存eps文件与figure文件显示不同之解决方法
下一篇:【原创】matlab相对路径的设置
收藏 IP: 159.226.158.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-17 21:41

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部