📄 twoway_scatteri.hlp
字号:
{smcl}
{* 06apr2005}{...}
{cmd:help twoway scatteri}
{hline}
{title:Title}
{p2colset 5 34 36 2}{...}
{p2col :{hi:[G] graph twoway scatteri} {hline 2}}scatter with immediate arguments{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 24 2}
{cmdab:tw:oway}
{cmd:scatteri}
{it:immediate_values}
[{cmd:,}
{help twoway_scatteri##scatteri_options:{it:options}}]
{pstd}
where {it:immediate_values} is one or more of
{it:#_y} {it:#_x} [{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:scatteri} is an immediate version of
{helpb scatter:graph twoway scatter}; see {hi:[U] 19 Immediate commands}
and {help immed}. {cmd:scatteri} is intended for programmer use but can be
useful interactively.
{title:Options}
{phang}{marker scatteri_options}
{it:options} are as defined in {helpb scatter}, with the
following modifications:
{pmore}
If {cmd:"}{it:text for label}{cmd:"} is specified among any of the
immediate arguments, marker {cmd:mlabel()} is assumed.
{pmore}
If {cmd:(}{it:#_clockposstyle}{cmd:)} is specified among any of the
immediate arguments, option {cmd:mlabvposition()} is assumed.
{title:Remarks}
{pstd}
Immediate commands are commands that obtain data from numbers typed
as arguments. Typing
{cmd:. twoway scatteri 1 1 2 2,} {it:any_options}
{pstd}
produces the same graph as typing
{cmd:. clear}
{cmd:. input y x}
{txt} y x
1{cmd}. 1 1
{txt} 2{cmd}. 2 2
{txt} 3{cmd}. end
{txt}
{cmd:. twoway scatter y x,} {it:any_options}
{pstd}
{cmd:twoway} {cmd:scatteri} does not modify the data in memory.
{pstd}
{cmd:scatteri} is intended for programmer use but can be used
interactively. In {it:{help added_text_option}} we demonstrated the
use of option {cmd:text()} to add text to a graph:
{cmd}. 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)){txt}
{it:({stata `"gr_example auto: 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})}
{* graph atofig1, but do not repeat in manual version}{...}
{pstd}
Below we use {cmd:scatteri} to obtain similar results:
{cmd}. twoway qfitci mpg weight, stdf ||
scatter mpg weight, ms(O) ||
scatteri 41 2040 (3) "VW Diesel"
28 3260 (3) "Plymouth Arrow"
35 2050 (3) "Datsun 210 and Subaru"
, msymbol(i){txt}
{it:({stata `"gr_example auto: twoway qfitci mpg weight, stdf || scatter mpg weight, ms(O) || scatteri 41 2040 (3) "VW Diesel" 28 3260 (3) "Plymouth Arrow" 35 2050 (3) "Datsun 210 and Subaru" , ms(i)"':click to run})}
{* graph gtscatteri1}{...}
{pstd}
Note that we translated {cmd:text(}...{cmd:, place(e))} to {cmd:(3)},
3 o'clock being the {it:clockposstyle} notation for the {cmd:e}ast
{it:compassdirstyle}. Since labels are by default positioned at 3 o'clock,
we could omit {cmd:(3)} altogether:
{cmd}. twoway qfitci mpg weight, stdf ||
scatter mpg weight, ms(O) ||
scatteri 41 2040 "VW Diesel"
28 3260 "Plymouth Arrow"
35 2050 "Datsun 210 and Subaru"
, msymbol(i){txt}
{pstd}
Note that we specified {cmd:msymbol(i)} option to suppress displaying
the marker symbol.
{pin}
{it:Technical note:}{break}
Programmers:
Note carefully {cmd:scatter}'s {it:advanced_option} {cmd:recast()}; see
{it:{help advanced_options}}.
It can be used to good effect, such as using {cmd:scatteri} to add
areas, bars, spikes, and dropped lines.
{p_end}
{right:{c TLC}{c TRC}}
{right:{c BLC}{c BRC}}
{title:Also see}
{psee}
Manual: {bf:[G] graph twoway scatteri}
{psee}
Online: {helpb scatter}; {help immed}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -