📄 twoway_pci.hlp
字号:
{smcl}
{* 06apr2005}{...}
{cmd:help twoway pci}
{hline}
{title:Title}
{p2colset 5 29 31 2}{...}
{p2col :{hi:[G] graph twoway pci} {hline 2}}twoway paired-coordinate with
immediate arguments{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 24 2}
{cmdab:tw:oway}
{cmd:pci}
{it:immediate_values}
[{cmd:,}
{help twoway_pci##options:{it:options}}]
{pstd}
where {it:immediate_values} is one or more of
{it:#_y1} {it:#_x1} {it:#_y2} {it:#_x2} [{cmd:(}{it:#_clockposstyle}{cmd:)}] [{cmd:"}{it:text for label}{cmd:"}]
{pstd}
See {it:{help clockposstyle}} for a description of {it:#_clockposstyle}.
{title:Description}
{pstd}
{cmd:pci} is an immediate version of {helpb twoway pcspike};
see {hi:[U] 19 Immediate commands} and {help immed}.
{cmd:pci} is intended for programmer use but can be
useful interactively.
{marker options}{...}
{title:Options}
{phang}
{it:options} are as defined in {helpb twoway pcarrow}, with the
following modifications:
{pmore}
If {cmd:"}{it:text for label}{cmd:"} is specified among any of the
immediate arguments, option {cmd:mlabel()} is assumed.
{pmore}
If {cmd:(}{it:#_clockposstyle}{cmd:)} is specified among any of the
immediate arguments, option {cmd:mlabvposition()} is assumed.
{pmore}
Also see the marker options defined in {helpb twoway pccapsym} if the
{cmd:recast()} option is used to change the spikes into a
paired-coordinate plot that plots markers.
{title:Remarks}
{pstd}
Immediate commands are commands that obtain data from numbers typed
as arguments. Typing
{cmd:. twoway pci 1.1 1.2 1.3 1.4 2.1 2.2 2.3 2.4}
{pstd}
produces the same graph as typing
{cmd:. clear}
{cmd:. input y1 x1 y2 x2}
{txt} y1 x1 y2 x2
1{cmd}. 1.1 1.2 1.3 1.4
{txt} 2{cmd}. 2.1 2.2 2.3 2.4
{txt} 3{cmd}. end
{txt}
{cmd:. twoway pcspike y1 x1 y2 x2}
{pstd}
{cmd:twoway} {cmd:pci} does not modify the data in memory.
{pstd}
{cmd:pci} is intended for programmer use but can be used interactively. We
can combine a {cmd:pci} plot with other {cmd:twoway} plots to produce a quick
diagram.
{cmd}{...}
. twoway function y = -x^2, range(-2 2) ||
pci 0 1 0 -1 ||
pcarrowi 1.2 .5 0 0
{txt}{...}
{it:({stata `"twoway function y = -x^2, range(-2 2) || pci 0 1 0 -1 || pcarrowi 1.2 .5 0. 0"':click to run})}
{* graph gtpcarrowi1}{...}
{pstd}
We can improve the annotation with
{cmd}{...}
. twoway function y = -x^2, range(-2 2) ||
pci 0 1 0 -1 "Tangent", recast(pccapsym) msymbol(i) ||
pcarrowi 1.2 .5 0.05 0 "Maximum at x=0",
legend(off) title("Characteristics of y = -x^2")
{txt}{...}
{it:({stata `"twoway function y = -x^2, range(-2 2) || pci 0 1 0 -1 "Tangent", recast(pccapsym) msymbol(i) || pcarrowi 1.2 .5 0.05 0 "Maximum at x=0", legend(off) title("Characteristics of y = -x^2")"':click to run})}
{* graph gtpcarrowi2}{...}
{pstd}
A slightly more whimsical example is
{cmd}{...}
. twoway pci 2 0 2 6 4 0 4 6 0 2 6 2 0 4 6 4 ||
scatteri 5 1 3 3, msize(ehuge) ms(X) ||
scatteri 5 5 1 5, msize(ehuge) ms(Oh) legend(off)
{txt}{...}
{it:({stata `"twoway pci 2 0 2 6 4 0 4 6 0 2 6 2 0 4 6 4 || scatteri 5 1 3 3 , msize(ehuge) ms(X) || scatteri 5 5 1 5, msize(ehuge) ms(Oh) legend(off)"':click to run})}
{pstd}
{it:Technical note:}{break}
Programmers:
Note carefully {cmd:twoways}'s {it:advanced_option} {cmd:recast()}; see
{it:{help advanced_options}}.
It can be used to good effect, such as using {cmd:pci} to add
marker labels.
{p_end}
{right:{c TLC}{c TRC}}
{right:{c BLC}{c BRC}}
{title:Also see}
{psee}
Manual: {bf:[G] graph twoway pcarrowi}
{psee}
Online: {helpb twoway scatteri};
{helpb twoway pcarrow};
{helpb twoway};
{help immed}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -