Stata 15 help for gr7sym

help gr7sym (out-of-date command) -------------------------------------------------------------------------------

Warning

This help file documents the old version of Stata's graph command. See graph for the modern version.

Stata runs the old version of graph whenever graph is invoked under version control (see version) or when you use the graph7 or gr7 command.

graph7 command common options -- symbol and line options

{graph7 | gr7} [varlist] [weight] [if exp] [in range] [, graph_type specific_options common_options]

The line and symbol common_options are

xline[(numlist)] yline[(numlist)] rline[(numlist)] tline[(numlist)] connect(c[[p]] ... c[[p]]) bands(#) density(#) symbol(s...s) trim(#) psize(#)

The available c (connect() symbols) are . do not connect (default) l draw straight lines between points L draw straight lines between ascending x points m connect median bands using straight lines s connect median bands using cubic splines J connect rectilinearly, making steps || connect two variables vertically II same as ||, but cap bottom and top of line

The available p (connect() line patterns) are any combination of l solid line (default) _ (underscore) a long dash - (hyphen) a medium dash . a short dash (almost a dot) # a space

The available s (symbol() identifiers) are O large circle S large square T large triangle o small circle d small diamond p small plus x x . dot i invisible [varname] contents of variable to be used as text symbol [_n] use observation numbers as symbol

Information on the graph7 command and the different graph_types is found in graph7. This entry details the symbol and line common_options. Help for the other common_options is also available. See gr7axes for title and axes; gr7color for color and shading; gr7other for saving, printing, and multiple images.

Options

xline[(numlist)], yline[(numlist)], rline[(numlist)], and tline[(numlist)] draw lines (using pen 1) across the graph. yline and rline draw horizontal lines, xline and tline draw vertical lines. If the values at which the lines are to be drawn are not specified, "round" values are chosen for you.

connect(c...c) specifies if points are to be connected in twoway (see gr7twoway) and matrix (see gr7matrix) plots. connect() may be abbreviated c(). Specify the connect symbol(s) c as

. do not connect (default) l draw straight lines between points L draw straight lines between ascending x points m connect median bands using straight lines s connect median bands using cubic splines J connect rectilinearly, making steps || connect two variables vertically II same as ||, but cap bottom and top of line

l, L, and J connect points in the order of the data. To connect in the order of the x axis, also specify the sort option. "graph7 a b c , c(.l) sort" plots a versus c, not connecting the points, and b versus c, connecting points with straight lines.

Within each line type you can specify the pattern of the line. This can be done by adding a [pattern] after the line type, where pattern is any combination of the following:

l solid line (default) _ (underscore) a long dash - (hyphen) a medium dash . a short dash (almost a dot) # a space

Typing "graph7 a b c, c(.l[_.]) sort" plots a versus c not connecting the points and b versus c connecting points with a long-short-long-short dashed line.

Note, symbol(i) (see below) and connect() can be usefully combined: . regress y x . predict hat . graph7 y hat x, c(.l) s(Oi) sort

To graph high-low charts: "graph7 close high low time, s(oii) c(.||)"

bands(#) is used with connect(m) and connect(s); it specifies the number of bands along the x axis in which data are to be grouped and medians of x and y calculated. The default is bands(200). Reducing the number results in substantial smoothing: "graph7 y x, s(o) c(s) bands(12)".

density(#) is used only with connect(s); it specifies the number of points to be calculated on the cubic spline. The default is density(5). Increasing the density results in a smoother appearing image: "graph7 y x, s(o) c(s) bands(12) density(100)".

symbol(s...s) specifies the symbols used to draw points in twoway (see gr7twoway) and matrix (see gr7matrix) graph7 styles. symbol() may be abbreviated s(). Specify the symbol identifier(s) s as

O large circle (default for twoway) S large square T large triangle o small circle (default for twoway with by, or matrix) d small diamond p small plus x x . dot i invisible [varname] contents of variable to be used as text symbol [_n] use observation numbers as symbol

In the case of [varname], varname may be either a string or numeric variable. For instance, varname might be a string variable containing "Ca", "Wa", and "Or" for its first three observations. Then the text Ca would be used to mark the location of the first observation, Wa for the second, and Or for the third.

Examples: . graph7 y x, symbol(o) . graph7 y x, s(.) . graph7 y1 y2 x, s(OS) . graph7 y1 y2 x, s(oo) . graph7 y x, s([state]) . graph7 y x, s([_n]) . graph7 y1 y2 x, s([state]o) . graph7 y1 y2 x, s([state][_n]) . graph7 y1 y2 x, s([state]o) . graph7 a b c d, matrix s(.)

trim(#) is used only when one or more of the plotting symbols is [varname]. # specifies the maximum number of characters from varname to be used to make each coordinate and defaults to 8. It may be set smaller or larger than 8. For instance, if state were a string variable containing "California", "Washington", and "Oregon" in its first three observations, "graph7 y x, s([state]) trim(2)" would use Ca as the plotting symbol for the first observation, Wa for the second, and Or for the third.

psize(#) specifies the size of [varname] and [_n] plotting symbols. The default is 100, meaning 100% of normal size. psize(150) uses larger and psize(75) uses smaller symbols.

Also see

Help: [G-2] graph7, gr7axes, gr7bar, gr7box, gr7color, gr7hist, gr7matrix, gr7oneway, gr7other, gr7pie, gr7star, gr7twoway


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index