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

📄 legend_option.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
📖 第 1 页 / 共 3 页
字号:
    rendition of the points.  {cmd:legend()}'s {cmd:style()} suboption is
    documented directly below.

{phang}
{cmd:style(}{it:legendstyle}{cmd:)}
     specifies the overall look of the legend{hline 2}whether it is presented
     horizontally or vertically, how many keys appear across the legend if
     it is presented horizontally, etc.  The options listed below allow you to
     change each attribute of the legend, but {cmd:style()} is the starting
     point.

{pmore}
     You need not specify {cmd:style()} just because there is something
     you want to change.  You specify {cmd:style()} when another style
     exists that is exactly what you desire or when another style
     would allow you to specify fewer changes to obtain what you want.

{pmore}
     See {it:{help legendstyle}} for a list of available legend styles.

{phang}
{cmd:cols(}{it:#}{cmd:)} and {cmd:rows(}{it:#}{cmd:)}
     are alternatives; they specify in how many columns or rows (lines) the
     keys are to be presented.  The usual default is {cmd:cols(2)}, which
     means that legends are to take two columns:

	    {c TLC}{hline 47}{c TRC}
	    {c |}  o   Observed               {hline 3}  Linear fit   {c |}
	    {c |} ---  Quadratic fit                            {c |}
	    {c BLC}{hline 47}{c BRC}

{pmore}
     {cmd:cols(1)} would force a vertical arrangement,

	    {c TLC}{hline 22}{c TRC}
	    {c |}  o    Observed       {c |}
	    {c |} {hline 3}   Linear fit     {c |}
	    {c |} ---   Quadratic fit  {c |}
	    {c BLC}{hline 22}{c BRC}

{pmore}
    and {cmd:rows(1)} would force a horizontal arrangement:

	    {c TLC}{hline 63}{c TRC}
	    {c |}  o   Observed       {hline 3}   Linear fit     ---    Quadratic fit {c |}
	    {c BLC}{hline 63}{c BRC}

{phang}
{cmd:colfirst} and {cmd:nocolfirst}
    determine whether, when the keys are presented in multiple columns,
    keys are to read down or to read across, resulting in this

	    {c TLC}{hline 50}{c TRC}
	    {c |}  o    Observed               ---   Quadratic fit {c |}
	    {c |} {hline 3}   Linear fit                                 {c |}
	    {c BLC}{hline 50}{c BRC}

{pmore}
or this

	    {c TLC}{hline 50}{c TRC}
	    {c |}  o    Observed               {hline 3}   Linear fit    {c |}
	    {c |} ---   Quadratic fit                              {c |}
	    {c BLC}{hline 50}{c BRC}

{pmore}
The usual default is {cmd:nocolfirst}, so {cmd:colfirst} is the option.

{phang}
{cmd:textfirst} and {cmd:notextfirst}
     specify whether the keys are to be presented as descriptive text followed
     by the symbol or the symbol followed by descriptive text.  The usual
     default is {cmd:notextfirst}, so {cmd:textfirst} is the option.
     {cmd:textfirst} produces keys that look like this,

	    {c TLC}{hline 50}{c TRC}
	    {c |}              Observed   o      Linear fit  {hline 3}   {c |}
	    {c |}         Quadratic fit  ---                       {c |}
	    {c BLC}{hline 50}{c BRC}

{pmore}
and {cmd:textfirst} {cmd:cols(1)} produces

	    {c TLC}{hline 21}{c TRC}
	    {c |}       Observed   o  {c |}
	    {c |}     Linear fit  {hline 3} {c |}
	    {c |}  Quadratic fit  --- {c |}
	    {c BLC}{hline 21}{c BRC}

{phang}
{cmd:stack}
    specifies that the symbol-text be presented vertically with
    the symbol on top (or with the descriptive text on top if {cmd:textfirst}
    is also specified).
    {cmd:legend(stack)} would produce

	    {c TLC}{hline 47}{c TRC}
	    {c |}        o                    {hline 16}  {c |}
	    {c |}  Observed                   Linear fit        {c |}
	    {c |}  -----------------                            {c |}
	    {c |}  Quadratic fit                                {c |}
	    {c BLC}{hline 47}{c BRC}

{pmore}
    {cmd:legend(stack} {cmd:symplacement(left)} {cmd:symxsize(13)}
    {cmd:forcesize} {cmd:rowgap(4))} would produce

	    {c TLC}{hline 47}{c TRC}
	    {c |}  o                          {hline 3}{space 13}  {c |}
	    {c |}  Observed                   Linear fit        {c |}
	    {c |}                                               {c |}
	    {c |}  ---                                          {c |}
	    {c |}  Quadratic fit                                {c |}
	    {c BLC}{hline 47}{c BRC}

{pmore}
    {cmd:stack} tends to be used to produce single-column keys.
    {cmd:legend(cols(1)} {cmd:stack} {cmd:symplacement(left)} {cmd:symxsize(13)}
    {cmd:forcesize} {cmd:rowgap(4))}
    produces

	    {c TLC}{hline 17}{c TRC}
	    {c |}  o{space 14}{c |}
	    {c |}  Observed       {c |}
	    {c |}{space 17}{c |}
	    {c |}  {hline 3}{space 12}{c |}
	    {c |}  Linear fit     {c |}
	    {c |}{space 17}{c |}
	    {c |}  ---{space 12}{c |}
	    {c |}  Quadratic fit  {c |}
	    {c BLC}{hline 17}{c BRC}

{pmore}
    This is the real use of {cmd:stack}:  to produce narrow, vertical keys.

{phang}
{cmd:rowgap(}{it:relativesize}{cmd:)}
and
{cmd:colgap(}{it:relativesize}{cmd:)}
    specify the distance between lines and the distance between columns.
    The defaults are {cmd:rowgap(1.4)} and {cmd:colgap(4.9)}.
    See {it:{help relativesize}}.

{phang}
{cmd:symplacement(}{it:compassdirstyle}{cmd:)}
    specifies how symbols are justified in the key.  The default is
    {cmd:symplacement(center)}, meaning that they are vertically and
    horizontally centered.  The two most-commonly specified alternatives are
    {cmd:symplacement(right)} (right alignment) and {cmd:symplacement(left)}
    (left alignment).  See {it:{help compassdirstyle}} for other
    alignment choices.

{phang}
{cmd:keygap(}{it:relativesize}{cmd:)},
{cmd:symysize(}{it:relativesize}{cmd:)},
{cmd:symxsize(}{it:relativesize}{cmd:)},
and
{cmd:textwidth(}{it:relativesize}{cmd:)}
    specify the height and width to be allocated for the key and the
    key's symbols and descriptive text:

		      {cmd:keygap()}
		       {c LT}{hline 3}{c RT}

	    {c TLC}{hline 10}{c TT}{hline 3}{c TT}{hline 20}{c TRC}   {c -}{c TT}{c -}
	    {c |}  {it:symbol}  {c |}   {c |}  {it:descriptive text}  {c |}    {c |}   {cmd:symysize()}
	    {c BLC}{hline 10}{c BT}{hline 3}{c BT}{hline 20}{c BRC}   {c -}{c BT}{c -}

	    {c LT}{hline 10}{c RT}   {c LT}{hline 20}{c RT}
	     {cmd:symxsize()}          {cmd:textwidth()}

{pmore}
    The defaults are

	    {hline 58}
	    {cmd:symxsize()}     13
	    {cmd:keygap()}        2
	    {cmd:textwidth()}    according to longest descriptive text line
	    {cmd:symysize()}     according to height of font (*)
	    {hline 58}
	    (*) The size of the font is set by the {it:textbox_option}
		{cmd:size(}{it:relativesize}{cmd:)}; see {it:textbox_options} below.

{pmore}
    Markers are placed in the symbol area, centered according to
    {cmd:symplacement()}.

{pmore}
    Lines are placed in the symbol area vertically according to
    {cmd:symplacement()} and horizontally are drawn to length
    {cmd:symxsize()}.

{pmore}
    Color swatches fill the {cmd:symysize()} {it:x} {cmd:symxsize()} area.

{pmore}
    See {it:{help relativesize}} for information on specifying relative
    sizes.

{phang}
{cmd:forcesize}
    causes the sizes specified by {cmd:symysize()} and {cmd:symxsize()} to be
    respected.  If {cmd:forcesize} is not specified, once all the symbols have
    been placed for all the keys, the symbol area is compressed (or expanded)
    to be no larger than necessary to contain the symbols.

{phang}
{cmd:bmargin(}{it:marginstyle}{cmd:)}
     specifies the outer margin around the legend.  That is, it specifies
     how close other things appearing near to the legend can get.  Also see
     suboption {cmd:margin()} under
     {hi:Suboptions for use with legend(region())} below for specifying the
     inner margin between the border and contents.  See 
     {it:{help marginstyle}} for a list of margin choices.

{phang}
{it:textbox_options}
     affect the rendition of the descriptive text associated with the keys.
     These are described in
     {it:{help textbox_options}}.
     One of the most commonly specified {it:textbox_options} is
     {cmd:size(}{it:relativesize}{cmd:)}, which specifies the size of font to
     be used for the descriptive text.

{phang}
{it:title_options}
     allow placing titles, subtitles, notes, and captions on legends.
     For instance, {cmd:legend(col(1) subtitle("Legend"))} produces

	    {c TLC}{hline 21}{c TRC}
	    {c |}        {bf:Legend}       {c |}
	    {c |}                     {c |}
	    {c |}  o   Observed       {c |}
	    {c |} {hline 3}  Linear fit     {c |}
	    {c |} ---  Quadratic fit  {c |}
	    {c BLC}{hline 21}{c BRC}

{pmore}
     Note our use of {cmd:subtitle()} and not {cmd:title()}; {cmd:title()}s
     are nearly always too big.
     See {it:{help title_options}}.

{phang}
{cmd:region(}{it:roptions}{cmd:)}
     specifies the border and shading of the legend.
     You could remove the border around the legend by specifying
     {cmd:legend(region(lstyle(none)))} (thus doing away with the line)
     or
     {cmd:legend(region(lcolor(none)))} (thus making the line invisible).
     Alternatively, you could give the legend a gray background tint
     by specifying
     {cmd:legend(region(fcolor(gs5)))}.
     See {hi:Suboptions for use with legend(region())} below.


{title:Suboptions for use with legend(region())}

{phang}
{cmd:style(}{it:areastyle}{cmd:)}
     specifies the overall style of the region in which the
     legend appears.  The other suboptions allow you to change
     the region's attributes individually, but {cmd:style()} provides
     the starting point.  See 
     {it:{help areastyle}} for a list of choices.

{phang}
{cmd:color(}{it:colorstyle}{cmd:)}
    specifies the color of the background of the legend and the line
    used to outline it.  See {it:{help colorstyle}} for a list of color
    choices.

{phang}
{cmd:fcolor(}{it:colorstyle}{cmd:)}
    specifies the background (fill) color for the legend.
    See {it:{help colorstyle}} for a list of color choices.

{phang}
{cmd:lstyle(}{it:linestyle}{cmd:)}
    specifies the overall style of the line used to outline the legend,
    which includes its pattern (solid, dashed, etc.), its thickness, and
    its color.  The other suboptions listed below allow you to
    change the line's attributes individually,
    but {cmd:lstyle()} is the starting point.
    See {it:{help linestyle}} for a list of choices.

{phang}
{cmd:lcolor(}{it:colorstyle}{cmd:)}
    specifies the color of the line used to outline the legend.
    See {it:{help colorstyle}} for a list of color choices.

{phang}
{cmd:lwidth(}{it:linewidthstyle}{cmd:)}
    specifies the thickness of the line used to outline the legend.
    See {it:{help linewidthstyle}} for a list of choices.

{phang}
{cmd:lpattern(}{it:linepatternstyle}{cmd:)}
    specifies whether the line used to outline the legend is solid, dashed,
    etc.
    See {it:{help linepatternstyle}} for a list of choices.

{phang}
{cmd:margin(}{it:marginstyle}{cmd:)}
    specifies the inner margin between the border and the contents of the
    legend.  Also see
    {cmd:bmargin()} under {hi:Content suboptions for use with legend()}
    above for specifying the outer margin around the legend.
    See {it:{help marginstyle}} for a list of margin choices.


{title:Location suboptions for use with legend()}

{phang}
{cmd:off} and {cmd:on}
    determine whether the legend appears.
    The default is {cmd:on} when more than one
    symbol (meaning marker, line style, or color swatch) appears in
    the legend.  In those cases, {cmd:legend(off)} will suppress the
    display of the legend.

{phang}
{cmd:position(}{it:clockposstyle}{cmd:)} and
{cmd:ring(}{it:ringposstyle}{cmd:)}
    override the default location of the legend, which is usually centered
    below the plot region.  {cmd:position()} specifies a direction {it:(sic)}
    according to the hours on the dial of a 12-hour clock, and {cmd:ring()}
    specifies the distance from the plot region.

{pmore}
    {cmd:ring(0)} is defined as being inside the plot region itself and allows you
    to place the legend inside the plot.  {cmd:ring(}{it:k}{cmd:)}, {it:k}>0,
    specifies positions outside the plot region; the larger the {cmd:ring()}
    value, the farther away from the plot region the legend is.  {cmd:ring()}
    values may be integers or nonintegers and are treated ordinally.

{pmore}
    {cmd:position(12)} puts the legend directly above the plot region
    (assuming {cmd:ring()}>0), {cmd:position(3)} directly to the right
    of the plot region, and so on.

{pmore}
    See
    {help legend_option##remarks3:Where legends appear} under {hi:Remarks} below and
    {help title_options##remarks3:Positioning of titles} in
    {it:{help title_options}} for more information on
    the {cmd:position()} and {cmd:ring()} suboptions.

{phang}
{cmd:span} specifies that the legend be placed in an area spanning the
    entire width (or height) of the graph rather than an area spanning the
    plot region.
    This affects whether the legend is centered with respect to the plot
    region or the entire graph.

⌨️ 快捷键说明

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