⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 connect_options.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
字号:
{smcl}
{* 09mar2005}{...}
{cmd:help connect_options}
{hline}
{* index connect() tt option}{...}
{* index sort tt option}{...}
{* index sort() tt option}{...}
{* index cmissing tt option}{...}

{title:Title}

{p2colset 5 28 30 2}{...}
{p2col :{hi:[G] {it:connect_options}} {hline 2}}Options for connecting data points with lines{p_end}
{p2colreset}{...}


{title:Syntax}

	{it:connect_options}{col 38}description
	{hline 70}
	{cmdab:c:onnect:(}{it:{help connectstyle}}{cmd:)}{...}
{col 38}how to connect points
	{cmd:sort}[{cmd:(}{it:varlist}{cmd:)}]{...}
{col 38}how to sort before connecting
	{cmdab:cmis:sing:(}{c -(}{cmd:y}|{cmd:n}{c )-} ...{cmd:)}{...}
{col 38}missing values are ignored

	{cmdab:lp:attern:(}{it:{help linepatternstyle}}{cmd:)}{...}
{col 38}line pattern (solid, dashed, etc.)
	{cmdab:lw:idth:(}{it:{help linewidthstyle}}{cmd:)}{...}
{col 38}thickness of line
	{cmdab:lc:olor:(}{it:{help colorstyle}}{cmd:)}{...}
{col 38}color of line
	{cmdab:lsty:le:(}{it:{help linestyle}}{cmd:)}{...}
{col 38}overall style of line

	{cmdab:psty:le:(}{it:{help pstyle}}{cmd:)}{...}
{col 38}overall plot style, including linestyle

	{help advanced_options:{bf:recast(}{it:newplottype}{bf:)}}{...}
{col 38}advanced; treat plot as {it:newplottype}
	{hline 70}
{pin}
All options are {it:rightmost}; see {help repeated options}.
If both {cmd:sort} and {cmd:sort(}{it:varlist}{cmd:)} are specified,
{cmd:sort} is ignored and
{cmd:sort(}{it:varlist}{cmd:)} is honored.


{title:Description}

{pstd}
The {it:connect_options} specify how points on a graph are
to be connected.

{pstd}
In certain contexts (e.g., {cmd:scatter}; see {helpb scatter}),
the {cmd:lstyle()}, {cmd:lpattern()}, {cmd:lwidth()},
and {cmd:lcolor()} options may be specified with a list of elements, with the
first element applying to the first variable, the second element to the
second variable, and so on.  For information about specifying lists, see 
{it:{help stylelists}}.


{title:Options}

{phang}
{opt connect(connectstyle)} specifies whether points are to be connected and,
if so, how the line connecting them is to be shaped.  The line between each
pair of points can connect them directly or in stairstep fashion.

{phang}
{cmd:sort} and {cmd:sort(}{it:varlist}{cmd:)}
    specify how the data be sorted before the points are connected.

{pmore}
    {cmd:sort} specifies that the data should be sorted by the {it:x}
    variable.

{pmore}
    {cmd:sort(}{it:varlist}{cmd:)} specifies that the data be
    sorted by the specified variables.

{pmore}
    {cmd:sort} is the option usually specified.
    Unless you are after a special
    effect or your data are already sorted, do not forget to specify this
    option.  If you are after a special effect, and if the data are not
    already sorted, you can specify {cmd:sort(}{it:varlist}{cmd:)} to specify
    exactly how the data should be sorted.

{pmore}
    Specifying {cmd:sort} or {cmd:sort(}{it:varlist}{cmd:)} when it is not
    necessary will slow {cmd:graph} down a little.  It is usually necessary to
    specify {cmd:sort} if you specify the {cmd:twoway} option {cmd:by()}, and
    especially if you include the suboption {cmd:total}.

{pmore}
    Options {cmd:sort} and {cmd:sort(}{it:varlist}{cmd:)} may not be repeated
    within the same plot.

{phang}
{cmd:cmissing(}{c -(}{cmd:y}|{cmd:n}{c )-} ...{cmd:)}
    specifies whether missing values are to be ignored.  The default is
    {cmd:cmissing(y} {cmd:...)}, meaning that they are ignored.
    Consider the following data:

	    {txt}
		 {c TLC}{hline 8}{c -}{hline 3}{c TRC}
		 {c |} {res}  rval   x {txt}{c |}
		 {c LT}{hline 8}{c -}{hline 3}{c RT}
	      1. {c |} {res}  .923   1 {txt}{c |}
	      2. {c |} {res} 3.046   2 {txt}{c |}
	      3. {c |} {res} 5.169   3 {txt}{c |}
	      4. {c |} {res}     .   . {txt}{c |}
	      5. {c |} {res} 9.415   5 {txt}{c |}
		 {c LT}{hline 8}{c -}{hline 3}{c RT}
	      6. {c |} {res}11.538   6 {txt}{c |}
		 {c BLC}{hline 8}{c -}{hline 3}{c BRC}{txt}

{pmore}
Say that you graph these data using "{cmd:line} {cmd:rval} {cmd:x}" or
equivalently "{cmd:scatter} {cmd:rval} {cmd:x,} {cmd:c(l)}".
Do you want a break in the line between 3 and 5?  If so, you code

	    {cmd:. line rval x, cmissing(n)}

{pmore}
or equivalently

	    {cmd:. scatter rval x, c(l) cmissing(n)}

{pmore}
If you omit the option (or code {cmd:cmissing(y)}), the data are treated
as if they contained

		 {c TLC}{hline 8}{c -}{hline 3}{c TRC}
		 {c |} {res}  rval   x {txt}{c |}
		 {c LT}{hline 8}{c -}{hline 3}{c RT}
	      1. {c |} {res}  .923   1 {txt}{c |}
	      2. {c |} {res} 3.046   2 {txt}{c |}
	      3. {c |} {res} 5.169   3 {txt}{c |}
	      4. {c |} {res} 9.415   5 {txt}{c |}
	      5. {c |} {res}11.538   6 {txt}{c |}
		 {c BLC}{hline 8}{c -}{hline 3}{c BRC}{txt}

{pmore}
meaning that a line will be drawn between {bind:(3, 5.169)} and
{bind:(5, 9.415)}.

{pmore}
If you are plotting more than one variable, you may specify a sequence of
{cmd:y}/{cmd:n} answers.

{phang}
{cmd:lstyle(}{it:linestyle}{cmd:)},
{cmd:lpattern(}{it:linepatternstyle}{cmd:)},
{cmd:lwidth(}{it:linewidthstyle}{cmd:)}, and
{cmd:lcolor(}{it:colorstyle}{cmd:)}
    determine the look of the line used to connect the points; see 
    {help lines}.  Note the {cmd:lpattern()} option, which
    allows you to specify whether the line is solid, dashed, etc.;
    see {it:{help linepatternstyle}} for a list of line-pattern choices.

{phang}
{cmd:pstyle(}{it:pstyle}{cmd:)}
    specifies the overall style of the plot, including not only the linestyle,
    but all other settings for the look of the plot.  Only the 
    {it:{help linestyle}} affects the look of {cmd:line} plots.  See 
    {it:{help pstyle}} for a list of available plot styles.

{phang}
{cmd:recast(}{it:newplottype}{cmd:)}
        is an advanced option allowing the plot to be recast from one type to
        another; for example, from a {help twoway line:line plot} to
        {help twoway scatter:scatter plot}; see help 
        {it:{help advanced options}}.  Most, but not all plots allow
        {cmd:recast()}.


{title:Remarks}

{pstd}
An important option among all the above is {cmd:connect()}, which  determines
whether and how the points are connected.  The points need not be connected at
all ({cmd:connect(i)}), which is {cmd:scatter}'s default.  Or the points might
be connected by straight lines ({cmd:connect(l)}), which is {cmd:line}'s
default (and available in {cmd:scatter}).  {cmd:connect(i)} and
{cmd:connect(l)} are commonly specified, but there are other possibilities,
such as {cmd:connect(J)} (which connects in stairstep fashion and is
appropriate for empirical distributions).  See {it:{help connectstyle}}
for a full list of your choices.

{pstd}
Equally as important as {cmd:connect()} is {cmd:sort}.  If you do not
specify this, the points will be connected in the order in which they
are encountered.  That can be useful when you are creating special effects,
but, in general, you want the points sorted into ascending order of their
{it:x} variable.  That is what {cmd:sort} does.

{pstd}
The remaining connect options specify how the line is to look:  Is it solid or
dashed?  Is it red or green?  How thick is it?  Option
{cmd:lpattern()} can be of great importance, especially when printing to a
monochrome printer.  For a general discussion of lines (which occur in lots
of contexts other than connecting points), see {help lines}.


{title:Also see}

{psee}
Manual:  {bf:[G] {it:connect_options}}

{psee}
Online:  {help lines};
{it:{help colorstyle}},
{it:{help connectstyle}},
{it:{help linestyle}},
{it:{help linepatternstyle}},
{it:{help linewidthstyle}}
{p_end}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -