📄 aspect_option.hlp
字号:
{smcl}
{* 07mar2005}{...}
{cmd:help aspect_option}
{hline}
{title:Title}
{p2colset 5 26 28 2}{...}
{p2col :{hi:[G] {it:aspect_option}} {hline 2}}Option for controlling the aspect ratio of the plot region{p_end}
{p2colreset}{...}
{title:Syntax}
{it:aspect_option}{col 43}description
{hline 67}
{cmdab:aspect:ratio:(}{it:#} [{cmd:,} {it:pos_option}]{cmd:)}{...}
{col 43}set plot region aspect ratio to {it:#}
{hline 67}
{pstd}
where {it:pos_option} is
{it:pos_option}{col 43}description
{hline 67}
{cmdab:place:ment:(}{it:{help compassdirstyle}}{cmd:)}{...}
{col 43}placement of plot region
{hline 67}
{title:Description}
{pstd}
The {cmd:aspectratio()} option controls the relationship between
the height and width of a graph's plot region. For example, when {it:#}=1,
the height and width will be equal (their ratio is 1), and the plot region
will be square.
{title:Option}
{phang}
{cmd:aspectratio()} specifies the aspect ratio and, optionally, the
placement of the plot region.
{title:Suboption}
{phang}
{cmd:placement(}{it:{help compassdirstyle}}{cmd:)} specifies where the
plot region is to be placed in order to take up the area left over by
restricting the aspect ratio.
{title:Remarks}
{pstd}
The {cmd:aspectratio(}{it:#}{cmd:)} option constrains the ratio of the
plot region to {it:#}. So, if {it:#} is 1, the plot region is square; if it
is 2, the plot region is twice as tall as it is wide; and, if it is .25, the
plot region is one-fourth as tall as it is wide. The most common use is
{cmd:aspectratio(1)}, which produces a square plot region.
{pstd}
Note that the overall size of the graph is not changed by the
{cmd:aspectratio()} option. Thus constraining the aspect ratio will
generally leave some additional space around the plot region in either the
horizontal or vertical dimension. By default, the plot region will be
centered in this space, but you can use the {cmd:placement()} option to control
where the plot region is located. {cmd:placement(right)} will place the plot
region all the way to the right in the extra space, leaving all the blank
space to the left; {cmd:placement(top)} will place the plot region at the top
of the extra space, leaving all the blank space at the bottom;
{cmd:placement(left)} and {cmd:placement(right)} work similarly.
{pstd}
Specifying an aspect ratio larger than the default for a graph causes the
width of the plot region to become narrower. Conversely, a small aspect ratio
causes the plot region to become shorter. Because titles and legends can be
wider than the plot region, and because most {help schemes} do not allow
titles and legends to span beyond the width of the plot region, this can
sometimes lead to surprising spacing of some graph elements{hline 2}for
example, axes may be forced away from their plot region. If this occurs, the
spacing can be improved by adding the {cmd:span} suboption to the
{cmd:title()}, {cmd:subtitle()}, {cmd:legend()}, or other options. The
{cmd:span} option must be added to each element that is wider than the plot
region. See {bf:spanning} in {help title_options} for a diagram.
{title:Also see}
{psee}
Manual: {bf:[G] {it:aspect_option}}
{psee}
Online: {helpb graph twoway},
{helpb graph bar},
{helpb graph box},
{helpb graph dot}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -