help twoway pci dialog: twoway
-------------------------------------------------------------------------------
Title
[G] graph twoway pci -- Twoway paired-coordinate plot with immediate
arguments
Syntax
twoway pci immediate_values [, options]
where immediate_values is one or more of
#_y1 #_x1 #_y2 #_x2 [(#_clockposstyle)] ["text for label"]
See [G] clockposstyle for a description of #_clockposstyle.
Menu
Graphics > Twoway graph (scatter, line, etc.)
Description
pci is an immediate version of twoway pcspike; see [U] 19 Immediate
commands and immed. pci is intended for programmer use but can be useful
interactively.
Options
options are as defined in [G] graph twoway pcspike, with the following
modifications:
If "text for label" is specified among any of the immediate
arguments, option mlabel() is assumed.
If (#_clockposstyle) is specified among any of the immediate
arguments, option mlabvposition() is assumed.
Also see the marker options defined in [G] graph twoway pccapsym if
the recast() option is used to change the spikes into a
paired-coordinate plot that plots markers.
Remarks
Immediate commands are commands that obtain data from numbers typed as
arguments. Typing
. twoway pci 1.1 1.2 1.3 1.4 2.1 2.2 2.3 2.4
produces the same graph as typing
. clear
. input y1 x1 y2 x2
y1 x1 y2 x2
1. 1.1 1.2 1.3 1.4
2. 2.1 2.2 2.3 2.4
3. end
. twoway pcspike y1 x1 y2 x2
twoway pci does not modify the data in memory.
pci is intended for programmer use but can be used interactively. We can
combine a pci plot with other twoway plots to produce a quick diagram.
. twoway function y = -x^2, range(-2 2) ||
pci 0 1 0 -1 ||
pcarrowi 1.2 .5 0 0
(click to run)
We can improve the annotation with
. 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{superscript:2}")
(click to run)
A slightly more whimsical example is
. 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)
Technical note:
Programmers: Note carefully twoways's advanced_option recast(); see [G]
advanced_options. It can be used to good effect, such as using pci to
add marker labels.
++
++
Also see
Manual: [G] graph twoway pcarrowi
Help: [G] graph twoway scatteri; [G] graph twoway pcarrow; [G] graph
twoway; [U] 19 Immediate commands