help twoway pcarrowi dialog: twoway
-------------------------------------------------------------------------------
Title
[G] graph twoway pcarrowi -- Twoway pcarrow with immediate arguments
Syntax
twoway pcarrowi 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
pcarrowi is an immediate version of twoway pcarrow; see [U] 19 Immediate
commands and immed. pcarrowi is intended for programmer use but can be
useful interactively.
Options
options are as defined in [G] graph twoway pcarrow, 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.
Remarks
Immediate commands are commands that obtain data from numbers typed as
arguments. Typing
. twoway pcarrowi 1.1 1.2 1.3 1.4 2.1 2.2 2.3 2.4, any_options
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 pcarrowi y x, any_options
twoway pcarrowi does not modify the data in memory.
pcarrowi is intended for programmer use but can be used interactively.
In Basic use of [G] graph twoway pcarrow, we drew some simple clock hands
from data that we input. We can draw the same graph by using pcarrowi.
. twoway pcarrowi 0 0 0 1 0 0 1 0
(click to run)
We can also draw the annotated second example,
twoway pcarrowi 0 0 0 1 (3) "3 o'clock"
0 0 1 0 (12) "12 o'clock",
aspect(1) headlabel plotregion(margin(vlarge))
(click to run)
As another example, in [G] added_text_options, we demonstrated the use of
option text() to add text to a graph:
. twoway qfitci mpg weight, stdf ||
scatter mpg weight, ms(O)
text(41 2040 "VW Diesel", place(e))
text(28 3260 "Plymouth Arrow", place(e))
text(35 2050 "Datsun 210 and Subaru", place(e))
(click to run)
Below we use pcarrowi to obtain similar results:
. twoway qfitci mpg weight, stdf ||
scatter mpg weight, ms(O) ||
pcarrowi 41 2200 41 2060 (3) "VW Diesel"
31 3460 28 3280 (3) "Plymouth Arrow"
35 2250 35 2070 (3) "Datsun 210 and Subaru",
legend(order(1 2 3))
(click to run)
Also see
Manual: [G] graph twoway pcarrowi
Help: [G] graph twoway scatteri; [G] graph twoway pcarrow; [G] graph
twoway; [U] 19 Immediate commands