orient

Sets or gets the paper orientation used for printing or saving a figure.

Category: Graphics > Printing and Saving

Syntax

orient portrait

Uses a vertical page.

orient landscape

Uses a horizontal page.

orient tall

Fills a portrait page with the figure.

o = orient

Returns the current orientation as text.

orient(fig, option)

Applies the option to the figure fig.

Description

The setting adjusts the paper properties of the figure (PaperOrientation and related ones), so it matters for print and saveas, not for what is drawn on screen. Landscape suits wide plots; tall uses nearly the whole portrait page.

Input arguments

option
'portrait', 'landscape' or 'tall'.
fig
Optional figure handle.

Output arguments

o
Orientation name.

Example

Choose and read the orientation

plot(1:3)
orient landscape
disp(orient)
orient tall
disp(orient)
Output
landscape
tall

See also

print saveas exportgraphics figure