orient - Paper orientation for printing or saving - MATLAB (original) (raw)
Paper orientation for printing or saving
Syntax
Description
orient [ornt](#bvmab39-1-ornt)
specifies the paper orientation to use when printing or saving the current figure to a paged format, such as PDF. Specify the orientation as either portrait
, landscape
, or tall
. Figure property values related to printing, such as the PaperPositionMode
value, affect the behavior.
orient([fig](#bvmab39-1-fig),[ornt](#bvmab39-1-ornt))
sets the paper orientation for the figure or Simulink® model specified by fig
. Use single quotes around the orientation option, such as 'portrait'
.
`or` = orient
returns the paper orientation value for the current figure as either 'portrait'
, 'landscape'
, or 'tall'
.
`or` = orient([fig](#bvmab39-1-fig))
returns the paper orientation value for the figure or Simulink model specified by fig
.
Examples
Create a figure with a surface plot and save the figure to a PDF format. Save the figure with the same size that it appears on screen and use a landscape orientation for the page.
fig = figure; surf(peaks) orient(fig,'landscape') print(fig,'LandscapePage.pdf','-dpdf')
Create a figure with a surface plot and save the figure to a PDF format. Use landscape orientation for the page and expand the figure size to fill page.
fig = figure; surf(peaks) fig.PaperPositionMode = 'manual'; orient(fig,'landscape') print(fig,'LandscapePage_ExpandedFigure.pdf','-dpdf')
Create a surface plot. Return the current paper orientation value for the figure.
figure surf(peaks) or = orient
Input Arguments
Paper orientation, specified as one of the values in this table.
Value | Description |
---|---|
landscape | Landscape orientation. Set the PaperOrientation property to 'landscape'. If the PaperPositionMode property of the figure is set to 'auto' (the default), then print or save the figure using the size of the figure on the screen.If the PaperPositionMode property of the figure is set to 'manual', then resize the figure to fit across the entire page with a 0.25-inch margin. Set the PaperPosition property accordingly. |
tall | Tall portrait orientation. Set the PaperOrientation property to 'portrait' and resize the figure to fit across the entire page with a 0.25-inch margin. Set the PaperPosition property accordingly. |
portrait | Portrait orientation. Set the PaperOrientation property to 'portrait'. If the PaperPositionMode property of the figure is set to 'auto', then print or save the figure using the size of the figure on the screen.If the PaperPositionMode property is 'manual', then set the PaperPosition property based on the default PaperType and PaperOrientation values. For details, see Effect of Default Values on portrait option. |
Effect of Default Values on portrait
Option
The default PaperType and PaperOrientation properties affect the result of the portrait
option in these ways.
Default Versus Current Figure PaperType Value | Default PaperOrientation Value | Current Figure PaperOrientation Value | Result |
---|---|---|---|
Same value | 'portrait' | Not applicable | Position the figure on the page using the default PaperPosition value for figures. In inches, it typically is [0.25 2.5 8 6]. |
Same value | 'landscape' | Not applicable | Position the figure on the page using the reverse of the default PaperPosition value for figures. In inches, it typically is [2.5 0.25 6 8]. |
Different values | Not applicable | 'portrait' | Position the figure on the page using the current PaperPosition value for the figure. |
Different values | Not applicable | 'landscape' | Position the figure on the page using the reverse of the current PaperPosition value for the figure, such as[y x height width]. |
Target figure or Simulink model, specified as a figure object or Simulink model. If you do not specify the figure or model, then orient
uses the current figure.
Version History
Introduced before R2006a