📄 dotplot.hlp
字号:
{smcl}
{* 27feb2005}{...}
{cmd:help dotplot}{right:dialog: {bf:{dialog dotplot}}}
{hline}
{title:Title}
{p2colset 5 20 22 2}{...}
{p2col :{hi:[R] dotplot} {hline 2}}Comparative scatterplots{p_end}
{p2colreset}{...}
{title:Syntax}
{phang}
Dotplot of varname, with one column per value of groupvar
{p 8 16 2}
{cmd:dotplot} {varname} {ifin} [{cmd:,} {it:options}]
{phang}
Dotplot for each variable in varlist, with one column per variable
{p 8 16 2}
{cmd:dotplot} {varlist} {ifin} [{cmd:,} {it:options}]
{synoptset 23 tabbed}{...}
{synopthdr}
{synoptline}
{syntab :Main}
{synopt :{opth "over(varlist:groupvar)"}}display one columnar dotplot for each value of {it:groupvar}{p_end}
{synopt :{opt mean}|{opt med:ian}}plot a horizontal line of pluses at the mean or median{p_end}
{synopt :{opt nx(#)}}horizontal dot density; default is {cmd:nx(0)}{p_end}
{synopt :{opt ny(#)}}vertical dot density; default is {cmd:ny(35)}{p_end}
{synopt :{opt i:ncr(#)}}label every {it:#} group; default is {cmd:incr(1)}{p_end}
{synopt :{opt bo:unded}}use minimum and maximum as boundaries{p_end}
{synopt :{opt b:ar}}plot horizontal dashed lines at shoulders of each group{p_end}
{synopt :{opt nogr:oup}}use the actual values of {it:yvar}{p_end}
{synopt :{opt ce:nter}}center the dot for each column{p_end}
{syntab :Plot}
INCLUDE help gr_markopt2
{syntab :Y-Axis, X-Axis, Title, Caption, Legend, Overall}
{synopt :{it:{help twoway_options}}}any options other than {opt by()} documented in
{bind:{bf:[G]} {it:twoway_options}} {p_end}
{synoptline}
{title:Description}
{pstd}
A dotplot is a scatterplot with values grouped together vertically ("binning",
as in a histogram) and with plotted points separated horizontally. The aim is
to display all the data for several variables or groups in a single, compact
graphic.
{pstd}
In the first syntax, {cmd:dotplot} produces a columnar dotplot of
{varname}, with one column per value of {it:groupvar}. In the second syntax,
{cmd:dotplot} produces a columnar dotplot for each variable in {varlist},
with one column per variable; {opt over(groupvar)} is not allowed. In each
case, the "dots" are plotted as small circles to increase readability.
{title:Options}
{dlgtab:Main}
{phang}
{opth "over(varlist:groupvar)"} identifies the variable for which {cmd:dotplot}
will display one columnar dotplot for each value of {it:groupvar}.
{phang}
[{opt mean}|{opt median}] plots a horizontal line of pluses at the mean or
median of each group.
{phang}
{opt nx(#)} sets the horizontal dot density. A larger value of {it:#} will
increase the dot density, reducing the horizontal separation between dots.
This will increase the separation between columns if two or more groups or
variables are used.
{phang}
{opt ny(#)} sets the vertical dot density (number of "bins" on the
y-axis). A larger value of {it:#} will result in more bins and a plot
that is less spread out in the horizontal direction. {it:#} should be
determined in conjunction with {opt nx()} to give the most pleasing
appearance.
{phang}
{opt incr(#)} specifies how the x-axis is to be labeled. {cmd:incr(1)},
the default, labels all groups. {cmd:incr(2)} labels every second group.
{phang}
{opt bounded} forces the minimum and maximum of the variable to be used as
boundaries of the smallest and largest bins. It should be used with a
single variable whose support is not the whole of the real line and whose
density does not tend to zero at the ends of its support, e.g., a uniform
random variable or an exponential random variable.
{phang}
{opt bar} plots horizontal dashed lines at the "shoulders" of each group. The
"shoulders" are taken to be the upper and lower quartiles unless {opt mean}
had been specified; in this case they will be the mean plus or minus the
standard deviation.
{phang}
{opt nogroup} uses the actual values of {it:yvar} rather than grouping them
(the default). This may be useful if {it:yvar} takes on only a few values.
{phang}
{opt center} centers the dots for each column on a hidden vertical line.
{dlgtab:Plot}
INCLUDE help gr_markoptf
{dlgtab :Y-Axis, X-Axis, Title, Caption, Legend, Overall}
{phang} {it:twoway_options} are any of the options documented in
{it:{help twoway_options}}, excluding {opt by()}. These include
options for titling the graph (see {it:{help title_options}}) and options for
saving the graph to disk (see {it:{help saving_option}}).
{title:Remarks}
{pstd}
{cmd:dotplot} produces a figure that has elements of a boxplot, a histogram,
and a scatterplot. Like a boxplot, it is most useful for comparing the
distributions of several variables or the distribution of a single variable
in several groups. Like a histogram, the figure provides a crude estimate of
the density, and, as with scatterplot, each symbol (dot) represents a single
observation.
{title:Examples}
{phang}{cmd:. dotplot mpg, over(foreign)}
{phang}{cmd:. dotplot mpg, over(foreign) nx(20) ny(10) center median bar}
{phang}{cmd:. dotplot gir1-gir10}
{phang}{cmd:. dotplot gir1-gir10, title("Tumor volume, cu mm")}
{title:Also see}
{psee}
Manual: {bf:[R] dotplot}
{psee}
Online: {helpb graph}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -