orient 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 , 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 ) returns the paper orientation value for the figure or Simulink model specified by fig .
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
or = 'portrait'
Paper orientation, specified as one of the values in this table.
Landscape orientation. Set the PaperOrientation property to 'landscape' .
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 orientation. Set the PaperOrientation property to 'portrait' .
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.
Introduced before R2006a
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.