• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

matlab print输出图像大小调整

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

通常默认情况下,print命令输出图像为 8*5inches,无视屏幕显示尺寸
通过命令行修改的话有三步

1 设置paperposition为manual
set(gcf,'PaperPositionMode', 'manual')
[ auto | {manual} ]

2 设置paperunit  
set(gcf,'PaperUnits','inches')
[ {inches} | centimeters | normalized | points ]

3 设置paperposition
set(gcf,'PaperPosition',[left,bottom,width,height])

例如
set(gcf, 'PaperPositionMode', 'manual');
set(gcf, 'PaperUnits', 'points');
set(gcf, 'PaperPosition', [0 0 640 480]);

还有一个相关命令是papersize
paperposition 是placement,代表图像在paper中的所处位置。left和bottom计算好,就可以使图像在paper中居中
papersize是纸张大小;position要比size小的


PaperPosition
    four-element rect vector
    Location on printed page. A rectangle that determines the location of the figure on the printed page. Specify this rectangle with a vector of the form
     rect = [left, bottom, width, height]
    where left specifies the distance from the left side of the paper to the left side of the rectangle and bottom specifies the distance from the bottom of the page to the bottom of the rectangle. Together these distances define the lower-left corner of the rectangle. width and height define the dimensions of the rectangle. The PaperUnits property specifies the units used to define this rectangle.


要使图像比例输出与屏幕显示的一致,可以使用如下命令
屏幕显示图像尺寸可以plot时用 set(gcf,'position',[left bottom width height]) 调整,或者print之前拖动窗口手动调整

This example exports a figure at screen size to a 24-bit TIFF file, myfigure.tif.

 

% set(gcf,'position',[80 100 800 600])  % 如果手动拖放,则不需要这一行命令
set(gcf, 'PaperPositionMode', 'auto')   % Use screen size
print -dtiff myfigure



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
DELPHI各种颜色表达式发布时间:2022-07-18
下一篇:
Delphi2009之TStringBuilder类[4]:Insert与Remove发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap