help gph (out-of-date command)
-------------------------------------------------------------------------------
Warning
This help file documents the old version of Stata's graph command. See
[G] graph for the modern version.
gph is no longer a command of Stata. Stata, however, still runs gph
whenever gph is invoked under version control (see [P] version).
Low-level graphics
gph is a programmer's command for constructing graphs. In the diagrams
below, V stands for varname.
version 7: gph open [, saving(filename) xsize(#) ysize(#)]
version 7: gph close
version 7: gph clear #r1 #c1 #r2 #c2
version 7: gph pen #
version 7: gph text #r #c #rotation #alignment text
version 7: gph font #delta_r #delta_c
version 7: gph vtext Vr Vc V_str [if exp] [in range]
version 7: gph line #r1 #c1 #r2 #c2
version 7: gph vline Vr Vc [if exp] [in range]
version 7: gph vpoly Vr1 Vc1 Vr2 Vc2 ... Vrp Vcp [if exp] [in range]
version 7: gph box #r1 #c1 #r2 #c2 #shade
version 7: gph point #r #c #delta_c #symbol
version 7: gph vpoint Vr Vc [Vdelta_c Vsymbol] [if exp] [in range] [,
size(#delta_c) symbol(#symbol) ]
version 7: gph arc #r #c #delta_c #phi1 #phi2 #shade
graph ... [, bbox(bounding_box) ...]
The graphics screen is
(r_min,c_min) (r_min,c_max)
(0,0) (0,32000)
+-----------------------+
| |
| |
| |
| |
| |
+-----------------------+
(23063,0) (23063,32000)
(r_max,c_min) (r_max,c_max)
A bounding_box is defined as 7 comma-separated integers
#, #, #, #, #, #, #
with the interpretation
r_top,c_lft, r_bot,r_rgt, text height, text width, rotation
A mapping is defined as (y_min,y_max,x_min,x_max,a_y,b_y,a_x,b_x) such
that the value (y,x) is mapped to screen coordinates (r,c) via
r = a_y*y + b_y if y_min <= y <= y_max
c = a_x*x + b_x if x_min <= x <= x_max
Rotation #'s are
0 horizontal
1 vertical
Alignment #'s are
-1 left justified
0 centered
1 right justified
#'s for textsizes are recommended to be such that #delta_r/#delta_c = 2.
The recommended text size is #delta_r=923 and #delta_c=444.
The symbol #'s are
0 dot
1 large circle
2 square
3 triangle
4 small circle
5 diamond
6 plus
7 x
The larger the size parameter #delta_c, the larger the symbol.
#delta_c=275 is recommended.
#'s for shading are the integers 0 to 4, where 4 is the darkest shading.
#'s for angles are measured from 0 to 32767, clockwise.
Description
gph provides programmers with access to Stata's low-level graphic
routines. With these, virtually any graph can be programmed.
In addition, the high-level graph command has option bbox(bounding_box)
that instructs graph to place its graphical output in the portion of the
screen specified. Thus, programmers may use any high-level graph command
as a subroutine.
gph commands may appear only inside a program define; gph commands may
not be typed interactively.
Also see
Help: [G] graph7; [G] graph