📄 twoway_pccapsym.hlp
字号:
{smcl}
{* 08apr2005}{...}
{cmd:help twoway pccapsym}{right:dialogs: {dialog twoway_overlay:overlaid twoway}{space 0}}
{right:{dialog twoway_simple:single twoway}{space 2}}
{hline}
{title:Title}
{p2colset 5 34 36 2}{...}
{p2col :{hi:[G] graph twoway pccapsym} {hline 2}}Paired-coordinate plot with
spikes capped with marker symbols{p_end}
{p2colreset}{...}
{* index twoway pccapsym tt}{...}
{* index paired-coordinate plots, pccapsym}{...}
{* index headlabel tt}{...}
{title:Syntax}
{p 8 60 2}
{cmdab:tw:oway}
{cmd:pccapsym}
{it:y1var} {it:x1var} {it:y2var} {it:x2var}
{ifin}
[{cmd:,}
{it:options}]
{p2colset 9 39 41 2}{...}
{p2col:{it:options}}description{p_end}
{p2line}
INCLUDE help gr_blspike2
INCLUDE help gr_markopt
INCLUDE help gr_headlabopt
INCLUDE help gr_hvpcopt
INCLUDE help gr_axlnk
INCLUDE help gr_twopt
{p2line}
{pin}
All explicit options are {it:rightmost}, except {cmd:headlabel},
{cmd:vertical}, and {cmd:horizontal}, which are {it:unique}; see
{help repeated options}.
{title:Description}
{pstd}
A paired-coordinate capped-symbol plot draws a spike (or line) for each
observation in the dataset and caps these spikes with a marker symbol at each
end. The line starts at the coordinate ({it:y1var},{it:x1var}) and ends at
the coordinate ({it:y2var},{it:x2var}), and both coordinates are designated
with a marker.
{title:Options}
INCLUDE help gr_blspikef2
{phang}
{it:marker_options}
specify how the markers look, including
shape, size, color, and outline;
see {it:{help marker_options}}. The same marker is used on both ends of
the spikes.
{phang}
{it:marker_label_options}
specify if and how the markers are to be labeled;
see {it:{help marker_label_options}}.
INCLUDE help gr_headlaboptf
INCLUDE help gr_hvpcoptf
INCLUDE help gr_axlnkf
INCLUDE help gr_twoptf
{title:Remarks}
{pstd}
Remarks are presented under the headings
{help twoway_pccapsym##basic_use:Basic use 1}
{help twoway_pccapsym##basic_use2:Basic use 2}
{marker basic_use}{...}
{title:Basic use 1}
{pstd}
We have longitudinal data from 1968 and 1988 on the earnings and total
experience of US women by occupation.
{cmd:. sysuse nlswide1, clear}
{cmd:. list occ wage68 ttl_exp68 wage88 ttl_exp88}
{txt}
{c TLC}{hline 15}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c TRC}
{c |} {res} occ wage68 ttl_e~68 wage88 ttl_e~88 {txt}{c |}
{c LT}{hline 15}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c RT}
1. {c |} {res}Professionals 6.121874 .860618 10.94776 14.11177 {txt}{c |}
2. {c |} {res} Managers 5.426208 1.354167 11.53928 13.88886 {txt}{c |}
3. {c |} {res} Sales 4.836701 .9896552 7.290306 12.62823 {txt}{c |}
4. {c |} {res} Clerical 4.088309 .640812 9.612672 11.08019 {txt}{c |}
5. {c |} {res} Craftsmen 4.721373 1.091346 7.839769 12.64364 {txt}{c |}
{c LT}{hline 15}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c RT}
6. {c |} {res} Operatives 4.364782 .7959284 5.893025 11.99362 {txt}{c |}
7. {c |} {res} Transport 1.987857 .5247414 3.200494 8.710394 {txt}{c |}
8. {c |} {res} Laborers 3.724821 .775966 5.264415 10.56182 {txt}{c |}
9. {c |} {res} Other 5.58524 .8278245 8.628641 12.78389 {txt}{c |}
{c BLC}{hline 15}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c BRC}
{txt}
{pstd}
We graph a spike with symbols capping the end to show the movement from 1968
values to 1988 values for each observation (each occupation):
{cmd:. twoway pccapsym wage68 ttl_exp68 wage88 ttl_exp88}
{it:({stata "gr_example nlswide1: twoway pccapsym wage68 ttl_exp68 wage88 ttl_exp88":click to run})}
{* graph gtpccapsym1}{...}
{pstd}
For a better presentation of this data, see
{help twoway_pcspike##advanced_use:Advanced use} in {help twoway pcspike},
and note that the comments there about combining plots apply equally well to
{cmd:pccapsym} plots.
{marker basic_use2}{...}
{title:Basic use 2}
{pstd}
We can draw both the edges and nodes of network diagrams using
{cmd:twoway pccapsym}.
{cmd:. sysuse network1}
{cmd:. twoway pccapsym y_c x_c y_l x_l}
{it:({stata "gr_example network1: twoway pccapsym y_c x_c y_l x_l":click to run})}
{* graph gtpccapsym2}{...}
{pstd}
Again a better presentation of this data can be found in {help twoway pcspike}
under {help twoway_pcspike##advanced_use2:Advanced use 2}.
{title:Also see}
{psee}
Manual: {bf:[G] graph twoway pcspike}
{psee}
Online:
{helpb twoway};
{helpb twoway line};
{helpb twoway rcapsym};
{helpb twoway pcspike},
{helpb twoway pcarrow},
{helpb twoway pcbarrow},
{helpb twoway pcscatter},
{helpb twoway pci}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -