------------------------------------------------------------------------------- help forsqr-------------------------------------------------------------------------------

-Make graphs squareor any other shape

sqrgraph_commandvarlist[ifexp] [inrange] [[weight]] [,aspectratio(#)graph_command_options]

Note: This program requires Stata 7 as a minimum. In Stata 8 and up, it applies only to old-style graphs produced by

gr7. The only reason to try to use it in Stata 8 and up is to apply it to such graphs, in which casegraphhere should be understood asgr7. Otherwise, find theaspectratio()option.

Description

sqris a command prefix to place before any graph command to make graphs square. Optionally, other aspect ratios may be specified. For example, many time series plots look better with low aspect ratios such that individual line segments are closer to 45 degrees from horizontal.

Remarks

sqrworks by using thebbox()option ofgraph. This will be possible so long as either (1)graph_commandis itselfgraphor (2) it is set up to callgraphwith any user-specified options ofgraph, and does not specifybbox()itself.

sqrdoes not control the shape of the data region, but the shape of the whole graph image. Nor is any adjustment made to (e.g.) size or positioning of lettering.

Options

aspectratio(#)specifies an aspect ratio (height / width) for the total graph image. In practice, aspect ratios between about 0.2 and 2 are possible. The default is 1 (square).

graph_command_optionsare whatever options apart frombbox()are allowed withgraph_command.

Examples (Stata 7). sqr graph mpg, by(foreign) box

. sqr tsgraph vol, a(0.4)

. for num 0.2(0.1)2, pause: sqr graph mpg weight, a(X)

AuthorNicholas J. Cox, University of Durham, U.K. n.j.cox@durham.ac.uk

Also seeOn-line: help for gph Manual:

[G] gph(Stata 7 only) FAQ: http://www.stata.com/support/faqs/graphics/sqgraph.html