MATLAB 帮助中心
打印或保存时使用的纸张方向
orient ornt
orient(fig,ornt)
or = orient
or = orient(fig)
orient ornt 指定在将当前图窗打印或保存为分页格式(如 PDF)时使用的纸张方向。将方向指定为 portrait、landscape 或 tall。与打印相关的图窗属性值(如 PaperPositionMode 值)会影响此行为。
ornt
portrait
landscape
tall
PaperPositionMode
示例
orient(fig,ornt) 将设置 fig 指定的图窗或 Simulink® 模型的纸张方向。使用单引号将方向选项引起来,例如 'portrait'。
fig
'portrait'
or = orient 以 'portrait'、'landscape' 或 'tall' 形式返回当前图窗的纸张方向值。
or
'landscape'
'tall'
or = orient(fig) 返回 fig 指定的图窗或 Simulink 模型的纸张方向值。
全部折叠
创建带有曲面图的图窗,并将图窗保存为 PDF 格式。使用屏幕上显示的相同大小保存图窗,并使用横向页面。
fig = figure; surf(peaks) orient(fig,'landscape') print(fig,'LandscapePage.pdf','-dpdf')
创建带有曲面图的图窗,并将图窗保存为 PDF 格式。对页面使用横向方向,并扩展图窗大小以填满页面。
fig = figure; surf(peaks) fig.PaperPositionMode = 'manual'; orient(fig,'landscape') print(fig,'LandscapePage_ExpandedFigure.pdf','-dpdf')
创建一个曲面图。返回图窗的当前纸张方向值。
figure surf(peaks) or = orient
or = 'portrait'
纸张方向,指定为下表中的值之一。
横向。将 PaperOrientation 属性设置为 'landscape'。
PaperOrientation
如果图窗的 PaperPositionMode 属性设置为 'auto'(默认值),则使用屏幕上的图窗大小打印或保存图窗。
'auto'
如果图窗的 PaperPositionMode 属性设置为 'manual',则调整图窗大小以适应整个页面并留有 0.25 英寸边距。相应地设置 PaperPosition 属性。
'manual'
PaperPosition
Tall 纵向。将 PaperOrientation 属性设置为 'portrait' 并调整图窗大小以适应整个页面并留有 0.25 英寸边距。相应地设置 PaperPosition 属性。
纵向。将 PaperOrientation 属性设置为 'portrait'。
如果图窗的 PaperPositionMode 属性设置为 'auto',则使用屏幕上的图窗大小打印或保存图窗。
如果 PaperPositionMode 属性为 'manual',则基于默认的 PaperType 和 PaperOrientation 值设置 PaperPosition 属性。有关详细信息,请参阅“默认值对 portrait 选项的影响”。
PaperType
默认的 PaperType 和 PaperOrientation 属性会通过以下方式影响 portrait 选项的结果。
[0.25 2.5 8 6]
[2.5 0.25 6 8]
[y x height width]
目标图窗或 Simulink 模型,指定为图窗对象或 Simulink 模型。如果您不指定图窗或模型,则 orient 将使用当前图窗。
orient
在 R2006a 之前推出
print
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处