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

📄 twoway_dot.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
字号:
{smcl}
{* 08apr2005}{...}
{cmd:help twoway dot}
{hline}
{* index dot plots}{...}
{* index ndots() tt option}{...}

{title:Title}

{p2colset 5 29 31 2}{...}
{p2col :{hi:[G] graph twoway dot} {hline 2}}Twoway dot plots{p_end}
{p2colreset}{...}


{title:Syntax}

{p 8 52 2}
{cmdab:tw:oway}
{cmd:dot}
{it:yvar} {it:xvar}
{ifin}
[{cmd:,}
{it:options}]

	{it:options}{col 40}description
	{hline 70}
	{cmdab:vert:ical}{...}
{col 40}vertical bar plot; the default
	{cmdab:hor:izontal}{...}
{col 40}horizontal bar plot
	{cmdab:dotex:tend:(yes}|{cmd:no)}{...}
{col 40}dots extend beyond point
	{cmd:base(}{it:#}{cmd:)}{...}
{col 40}value to drop to if {cmd:dotextend(no)}
	{cmdab:ndot:s:(}{it:#}{cmd:)}{...}
{col 40}{it:#} of dots in full span of {it:y} or {it:x}

	{cmdab:dsty:le:(}{it:{help markerstyle}}{cmd:)}{...}
{col 40}overall marker style of dots
	{cmdab:d:symbol:(}{it:{help symbolstyle}}{cmd:)}{...}
{col 40}marker symbol for dots
	{cmdab:dc:olor:(}{it:{help colorstyle}}{cmd:)}{...}
{col 40}fill and outline color for dots
	{cmdab:dfc:olor:(}{it:{help colorstyle}}{cmd:)}{...}
{col 40}fill color for dots
	{cmdab:dsiz:e:(}{it:{help markersizestyle}}{cmd:)}{...}
{col 40}size of dots
	{cmdab:dlsty:le:(}{it:{help linestyle}}{cmd:)}{...}
{col 40}overall outline style of dots
	{cmdab:dlc:olor:(}{it:{help colorstyle}}{cmd:)}{...}
{col 40}outline color for dots
	{cmdab:dlw:idth:(}{it:{help linewidthstyle}}{cmd:)}{...}
{col 40}thickness of outline for dots

        {it:{help scatter:scatter_options}}{...}
{col 40}any options other than {it:connect_options}
{col 42}documented in {bf:[G] graph twoway scatter}
	{hline 70}
{pin}
All options are {it:rightmost}, except {cmd:vertical} 
and {cmd:horizontal}, which are {it:unique}; see 
{help repeated options}.


{title:Description}

{pstd}
{cmd:twoway} {cmd:dot} displays numeric ({it:y},{it:x}) data as
dot plots.
Also see {helpb graph dot} to create dot plots of categorical variables.
{cmd:twoway} {cmd:dot} is useful in programming contexts.


{title:Options}

{phang}
{cmd:vertical} and {cmd:horizontal}
    specify either a vertical or a horizontal dot plot.
    {cmd:vertical} is the default.  If {cmd:horizontal} is specified, the
    values recorded in {it:yvar} are treated as {it:x} values, and the values
    recorded in {it:xvar} are treated as {it:y} values.
    That is, to make horizontal plots, do not switch the order of the
    two variables specified.

{pmore}
    In the {cmd:vertical} case, dots are drawn at the specified {it:xvar}
    values and extend up and down.

{pmore}
    In the {cmd:horizontal} case, lines are drawn at the specified {it:xvar}
    values and extend left and right.

{phang}
{cmd:dotextend(yes}|{cmd:no)}
    determines whether the dots extend beyond the {it:y} value (or {it:x}
    value if {cmd:horizontal} is specified).  {cmd:dotextend(yes)} is the
    default.

{phang}
{cmd:base(}{it:#}{cmd:)}
    is relevant only if {cmd:dotextend(no)} is also specified.  {cmd:base()}
    specifies the value from which the dots are to extend.  The default is
    {cmd:base(0)}.

{phang}
{cmd:ndots(}{it:#}{cmd:)}
    specifies the number of dots across a line; {cmd:ndots(75)} is the
    default.  Depending on printer/screen resolution, using fewer or more dots
    can make the graph look better.

{phang}
{cmd:dstyle(}{it:markerstyle}{cmd:)}
    specifies the overall look of the markers used to create the dots,
    including their shape and color.  The other options listed below
    allow you to change their attributes, but {cmd:dstyle()} provides the
    starting point.

{pmore}
    You need not specify {cmd:dstyle()} just because there is something you
    want to change.  You specify {cmd:dstyle()} 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 markerstyle}} for a list of available marker styles.

{phang}
{cmd:dsymbol(}{it:symbolstyle}{cmd:)}
    specifies the shape of the marker used for the dot.  See 
    {it:{help symbolstyle}} for a list of symbol choices, although it really
    makes little sense to change the shape of dots; else why would it be
    called a dot plot?

{phang}
{cmd:dcolor(}{it:colorstyle}{cmd:)}
    specifies the color of the symbol used for the dot.
    See {it:{help colorstyle}} for a list of color choices.

{phang}
{cmd:dfcolor(}{it:colorstyle}{cmd:)},
{cmd:dsize(}{it:markersizestyle}{cmd:)},
{cmd:dlstyle(}{it:linestyle}{cmd:)},
{cmd:dlcolor(}{it:colorstyle}{cmd:)}, and
{cmd:dlwidth(}{it:linewidthstyle}{cmd:)}
    are rarely (never) specified options.  They control, respectively, the
    fill color, size, outline style, outline color, outline width, 
    and, if you are really using dots,
    dots are affected by none of these things.  For these options to be
    useful, you must also specify {cmd:dsymbol()}; as we said earlier, why
    then would it be called a dot plot?  In any case, see
    {it:{help colorstyle}},
    {it:{help markersizestyle}},
    {it:{help linestyle}}, and
    {it:{help linewidthstyle}}
    for a list of choices.

{phang}
{it:scatter_options} refer to any of the options allowed by {cmd:scatter},
    and most especially the {it:marker_options}, which control how the marker
    (not the dot) appears.  {it:connect_options}, even if specified, are
    ignored.  See {helpb scatter}.


{title:Remarks}

{pstd}
{cmd:twoway} {cmd:dot} is of little, if any use.  We cannot think of a use
for it, but perhaps someday, somewhere, someone will.  Understand that we
have nothing against the dot plot used with categorical data{hline 2}see
{helpb graph dot} for a very useful command{hline 2}but using the dot
plot in a twoway context would be bizarre.  It is nonetheless included for
logical completeness.

{pstd}
In {helpb twoway bar}, we graphed the change in the value for the S&P 500.
Here is a bit of that data graphed as a dot plot:

	{cmd:. sysuse sp500, clear}

	{cmd:. twoway dot change date in 1/45}
	  {it:({stata "gr_example sp500: twoway dot change date in 1/45":click to run})}
{* graph gtdot1}{...}

{pstd}
Dot plots are usually presented horizontally,

	{cmd:. twoway dot change date in 1/45, horizontal}
	  {it:({stata "gr_example sp500: twoway dot change date in 1/45, horizontal":click to run})}
{* graph gtdot2}{...}

{pstd}
and below we specify the {cmd:dotextend(n)} option to prevent the dots from
extending clear across the range of {it:x}:

{phang2}
	{cmd:. twoway dot change date in 1/45, horizontal dotext(n)}
{p_end}
	  {it:({stata "gr_example sp500: twoway dot change date in 1/45, horizontal dotext(n)":click to run})}
{* graph gtdot3}{...}


{title:Also see}

{psee}
Manual:  {bf:[G] graph twoway dot}

{psee}
Online:  
{helpb scatter};
{helpb graph dot}
{p_end}

⌨️ 快捷键说明

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