📄 twoway_options.hlp
字号:
{smcl}
{* 01mar2005}{...}
{cmd:help twoway_options}
{hline}
{title:Title}
{p2colset 5 27 29 2}{...}
{p2col :{hi:[G] {it:twoway_options}} {hline 2}}Options for twoway graphs{p_end}
{p2colreset}{...}
{title:Syntax}
{pstd}
The {it:twoway_options} allowed with all {cmd:twoway} graphs are
{it:twoway_options}{col 39}description
{hline 69}
{it:{help added_line_options}}{...}
{col 39}draw lines at specified {it:y} or {it:x} values
{it:{help added_text_option}}{...}
{col 39}display text at specified ({it:y},{it:x}) value
{it:{help axis_options}}{...}
{col 39}labels, ticks, grids, log scales
{it:{help title_options}}{...}
{col 39}titles, subtitles, notes, captions
{it:{help legend_option}}{...}
{col 39}legend explaining what means what
{help scale_option:{bf:scale(}{it:#}{bf:)}}{...}
{col 39}resize text, markers, and line widths
{it:{help region_options}}{...}
{col 39}outlining, shading, graph size
{it:{help aspect_option}}{...}
{col 39}constrain aspect ratio of plot region
{help scheme_option:{bf:scheme(}{it:schemename}{cmd:)}}{...}
{col 39}overall look
{help by_option:{bf:by(}{it:varlist}{bf:, ...)}}{...}
{col 39}repeat for subgroups
{help nodraw_option:{bf:nodraw}}{...}
{col 39}suppress display of graph
{help name_option:{bf:name(}{it:name}{bf:, ...)}}{...}
{col 39}specify name for graph
{help saving_option:{bf:saving(}{it:filename}{bf:, ...)}}{...}
{col 39}save graph in file
{it:{help advanced_options}}{...}
{col 39}difficult to explain
{hline 69}
{title:Description}
{pstd}
The above options are allowed with all {cmd:twoway} plots, {cmd:scatter},
{cmd:line}, ...
{title:Options}
{phang}
{it:added_line_options}
specify that horizontal or vertical lines be drawn on the graph; see
{it:{help added_line_options}}. If your interest is in drawing grid lines
through the plot region, see {it:axis_options} below.
{phang}
{it:added_text_option}
specifies text to be displayed on the graph (inside the plot region);
see {it:{help added_text_option}}.
{phang}
{it:axis_options}
specify how the axes are to look, including values to be labeled or ticked
on the axes. These options also allow you to obtain logarithmic scales
and grid lines. See {it:{help axis_options}}.
{phang}
{it:title_options}
allow you to specify titles, subtitles, notes, and captions
to be placed on the graph; see {it:{help title_options}}.
{phang}
{it:legend_option}
specifies whether a legend is to appear and allows you to modify the
legend's contents.
See {it:{help legend_option}}.
{phang}
{cmd:scale(}{it:#}{cmd:)}
specifies a multiplier that affects the size of all text, markers, and
line widths in a graph. {cmd:scale(1)} is the default, and
{cmd:scale(1.2)} would make all text, markers, and line widths 20% larger.
See {it:{help scale_option}}.
{phang}
{it:region_options}
allow outlining the plot region (such as placing or suppressing a border
around the graph), specifying a background shading for the region, and
controlling the graph size. See {it:{help region_options}}.
{phang}
{it:aspect_option}
allows you to add control the relationship between the height and width of
a graph's plot region; see {it:{help aspect_option}}.
{phang}
{cmd:scheme(}{it:schemename}{cmd:)}
specifies the overall look of the graph;
see {it:{help scheme_option}}.
{phang}
{cmd:by(}{it:varlist}{cmd:,} ...{cmd:)}
specifies that the plot be repeated for each set of values of
{it:varlist}; see {it:{help by_option}}.
{phang}
{cmd:nodraw}
causes the graph to be constructed but not displayed;
see {it:{help nodraw_option}}.
{phang}
{cmd:name(}{it:name}[{cmd:, replace}]{cmd:)}
specifies the name of the graph. {cmd:name(Graph, replace)} is the default.
See {it:{help name_option}}.
{phang}
{cmd:saving(}{it:filename}[{cmd:, asis replace}]{cmd:)}
specifies that the graph be saved as {it:filename}. If {it:filename}
is specified without an extension, {cmd:.gph} is assumed.
{cmd:asis} specifies that the graph be saved just as it is.
{cmd:replace} specifies that, if the file already exists, it is okay
to replace it.
See {it:{help saving_option}}.
{phang}
{it:advanced_options}
are not so much advanced as they are difficult to explain and are
rarely used. They are also invaluable when you need them; see
{it:{help advanced_options}}.
{title:Remarks}
{pstd}
The above options may be used with any of the {cmd:twoway}
plottypes{hline 2}see {helpb twoway}{hline 2}for instance,
{cmd:. twoway scatter mpg weight, by(foreign)}
{phang2}
{cmd:. twoway line le year, xlabel(,grid) saving(myfile, replace)}
{pstd}
The above options are options of {cmd:twoway}, meaning that
they affect the entire twoway graph and not just one or the other of the plots
on it. For instance, in
{cmd}. twoway lfitci mpg weight, stdf ||
scatter mpg weight, ms(O) by(foreign, total row(1)){txt}
{pstd}
the {cmd:by()} option applies to the entire graph and in theory you should
type
{cmd}. twoway lfitci mpg weight, stdf ||
scatter mpg weight, ms(O) ||, by(foreign, total row(1)){txt}
{pstd}
or
{cmd}. twoway (lfitci mpg weight, stdf)
(scatter mpg weight, ms(O)), by(foreign, total row(1)){txt}
{pstd}
to demonstrate your understanding of that fact. You need not do that, however,
and in fact it does not matter to which plot you attach the
{it:twoway} {it:options}.
You could even type
{cmd}. twoway lfitci mpg weight, stdf by(foreign, total row(1)) ||
scatter mpg weight, ms(O){txt}
{pstd}
and, when specifying multiple {it:twoway_options}, you could even attach
some to one plot and the others to another:
{cmd}. twoway lfitci mpg weight, stdf by(foreign, total row(1)) ||
scatter mpg weight, ms(O) saving(myfile){txt}
{title:Also see}
{psee}
Manual: {bf:[G] {it:twoway_options}}
{psee}
Online: {helpb twoway};
{it:{help axis_options}},
{it:{help title_options}},
{it:{help legend_option}},
{it:{help scale_option}},
{it:{help region_options}},
{it:{help scheme_option}},
{it:{help by_option}},
{it:{help nodraw_option}},
{it:{help name_option}},
{it:{help saving_option}},
{it:{help advanced_options}}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -