.. index::
single: drawing graphs
single: G7 Command; title
single: G7 Command; subtitle
single: G7 Command; vaxtitle
single: G7 Command; vaxl
single: Graphing in G7
single: G7 Command; mgr
single: Multi-Scale Graph
single: G7 Command; lgr
single: Logarithmic Graphs
single: Scatter Graphs
single: Legend
single: Vertical Range
single: horizontal range
single: G7 Command; vrange
single: G7 Command; hrange
single: G7 Command; gprint
single: G7 Command; autoprint
single: G7 Command; gsave
single: G7 Command; annline
single: G7 Command; anntext
single: Annotating Graphs
single: G7 Command; gtitle
single: G7 Command; gtfile
Drawing Graphs
==============
*G7* can make a variety of graphs, which can then be printed, saved into Windows metafiles to be included in documents, or copied to the windows clipboard to be pasted into other applications. Here are the basic graph commands and related subsidiary commands. Detailed explanations follow.
:title: Provides the title for the graph.
:subti: Provides the subtitle.
:vaxti: Provides the vertical axis title.
:vaxl: Puts vertical axis labels inside or outside the rectangle of the graph.
:graph: Graphs up to seven series on one graph with one scale.
:mgr: Multi-scale graph. This is most useful with two series, since the left axis scale will be for the first series and the right axis scale for the second.
:sgraph: Scatter graph. Graphs one series against another.
:lgraph: Graphs variables that are in logarithms, while displaying the y axis in natural units
:vrange: Controls the vertical range of graphs (the y-axis scale).
:hrange: Controls the horizontal range for scatter graphs or the right-vertical range for multi-scale graphs.
:legend: Controls printing of legend on graphs.
The characteristics of each line on the graph are set by selecting Graph|Settings from the main menu.
**Graph Titles**
.. _G7UGtitle:
**(ti)tle
**
Provides a main title that appears on subsequents graphs. Use *ti* with no following text string to remove the title. Note that the font for the title, subtitle, and other text may be set in the *G7* Graph | Font menu.
**(subt)itle **
Provides a subtitle on the subsequent graphs. Use *subti* with no following text string to remove the subtitle.
**(vaxt)itle **
Provides a vertically printed title for the y (left) axis. Use *vaxti* with no following text to remove the left axis title.
**vaxl **
Causes the vertical axes numbers to be printed inside or outside the axes. The default is "vaxl in".
.. _G7UGDisplayingGraphs:
**Displaying Graphs**
| **(gr)aph [] [] ... [] [date3]**
| **(gr)aph () [()] [()] ... [()] [date3]**
| Constructs a standard Line Graph. Graph the named series from to or , if present. If is present, a vertical line (to separate history from forecast) will appear at . If dates have not changed since the last *graph* command, they need not be repeated. After a regression, the actual and predicted values may be plotted by *gr \**. The actual data will be marked by squares and the predicted by plusses, unless the marks have been changed by a previous *line* command. Algebraic expressions may be provided in place of some or all of the series names, so long as the expressions are enclosed in parentheses.
Example::
title RTB -- The Treasury Bill Rate
gr rtb 70.1 85.1
| **(mg)raph [] [] ... [] [date3]**
| **(mg)raph () [()] [()] ... [()] [date3]**
| Consruct a Multi-scale Graph. This is exactly like the *graph* command except that the series has its own vertical scale chosen so that its graph extends from the top to the bottom of the screen. The scale shown on the left is for the first series; the scale shown on the right is for the second. Algebraic expressions may be provided in place of some or all of the series names, so long as the expressions are enclosed in parentheses.
| **(lgr)aph [] [] ... [] [date3]**
| **(lgr)aph () [()] [()] ... [()] [date3]**
| Construct a Semi-Logarithmic Graph. This is exactly like the *graph* command except that the series are expected to be in logarithms. The vertical scale will be marked in the natural units, not the units of the logarithms. If vertical range control is in effect (see below), the vertical ranges will be presumed to be in natural units. Algebraic expressions may be provided in place of some or all of the series names, so long as the expressions are enclosed in parentheses.
| **(sgr)aph **
| **(sgr)aph () ()**
| Construct a Scatter Graph. This will display a scatter diagram of and . The graph is created with characteristics. Use the "0 width" option on the *line* command to plot only scatter points; otherwise the points will be connected. Each point on the two-dimensional graph measures the value of the first variable on the vertical axis, and the value of the second variable on the horizontal axis. For use only with the *sgraph* command, there is an *hrange* command that works just like the *vrange* command but it controls the horizontal axis. Algebraic expressions may be provided in place of either or both of the series names, so long as the expressions are enclosed in parentheses.
**Style of Graph -- Line, Range, Legend Control**
**line