您的位置:首页 > 编程语言 > MATLAB

MATLAB中设置figure的边框

2019-07-16 03:23 2903 查看
原文链接:https://www.geek-share.com/detail/2527189520.html

在matlab的help中,搜索"Automatic Axes Resize",就可以看到调节坐标的几个属性。假设随机生成一张图片100*100,然后保存为png格式,且DPI=300。

   imagesc(rand(100,100));           % generate a random image
   axis off                          % set off the axis
   set(gca, 'position', [0 0 1 1 ]); % the axis must be normalized
   print('-f1', '-r300', '-dpng','xxx.png'); % set the DPI

   这样就得到一张没有边框的图片。


trackback: http://blog.sciencenet.cn/home.php?mod=space&uid=267218&do=blog&id=356262

转载于:https://www.cnblogs.com/JohnShao/archive/2011/09/17/2179334.html

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: