.. index:: single: G7 Reference Manual; G single: G7 Command; gdates single: G7 Command; getsum single: G7 Command; glist single: G7 Command; gname single: G7 Command; gprint single: G7 Command; gsave single: G7 Command; graph single: G7 Command; plot single: G7 Command; gridtype single: G7 Command; group single: G7 Command; gtfile single: G7 Command; gtitle *G7* Commands: G ================ .. _G7RMgdates: | **gdates [gdate3]** | **gdates automatic** | Sets the dates used by subsequent *graph* (or *plot*) commands. With two dates provided, the series will be graphed from to . If a third date is given, the series will be graphed from to , with a vertical line drawn at . "gdates a" selects "automatic" dates for *graph* and *type* commands. The automatic dates are the first and last date of the series actually present. The default setting in *look* is for automatic dates, unless specific dates previously have been specified. Automatic dates also adjust automatically to the frequency of the series. This feature is not to be trusted when more than one series is being placed on the same graph. Related Topics: Dates in *G7*, :ref:`fdates `, :ref:`look `, :ref:`tdates ` .. _G7RMgetsum: | **getsum [] ** | Get the sum of the rows or columns of a given matrix for the range of periods specified by the *fdates*. The first argument must be the matrix or vector for which we want to obtain the sums. The matrix is assumed to be stored in the default vam file unless a bank letter is provided. The second argument must be 'r' or 'c' (to obtain the sum by rows or by columns). If only a partial sum is desired, then the columns or rows are specified next. The last argument is the vector where the result is to be stored; this vector must be located in the default vam file. Example:: getsum amf c intcol This example puts the column sum of the A-matrix in flows ("amf") into the vector intcol. The sum is calculated and stored for all the years in the Vam file so that we cannot have mixed information in the target vector. Related Topics: :ref:`coef `, :ref:`flow ` .. _G7RMglist: | **glist ** | This command lists the sectors in a group. The specifies the group name. For named groups to be available, there must be a GROUPS.BIN file in the current directory, created by the *G7* or by the *Fixer* program. (See the *Fixer* documentation for more on how to create named groups.) Otherwise, there is one dynamic group, named ":", which is available after using the *group* command. Example:: group 19-25 (20 22) The name of this dynamic group is ":". The names and content of the static groups defined in *Fixer* or with the *G7* *group* command are preceded by a : in commands that use groups. After the above *group* command, the command:: glist : would give:: 19 21 23 24 25 Related Topics: :ref:`group `, :ref:`listgroups ` .. _G7RMgname: | **(gn)ame ** | In working with multisectoral models, it is common to have add files that draw graphs for many sectors. In this case, the *gname* can get a series of graphs started with a name and number, as follows:: gname out 1 The name of the save file for the first graph drawn will then be OUT1.WMF, for the second OUT2.WMF, and so on. Note that the numbers increase with each graph drawn whether or not it is saved. Related Topics: Drawing Graphs, :ref:`gsave ` .. _G7RMgprint: | **(gp)rint** | Print the displayed graph to the currently assigned default printer. This command is useful when you would like to print a large number of graphs without user intervention. Set up the default printer setup with Graph | Printer setup, then use *gprint* to print each graph in turn. Related Topics: Drawing Graphs .. _G7RMgraph: | **(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 Related Topics: Dates in *G7*, Drawing Graphs in *G7*, Printer, :ref:`autoprint `, :ref:`hrange `, :ref:`legend `, :ref:`lgraph `, :ref:`line `, :ref:`look `, :ref:`mgraph `, :ref:`sgraph `, :ref:`subtitle `, :ref:`title `, :ref:`vrange `, :ref:`vaxlab `, :ref:`vaxtitle ` .. _G7RMgridtype: | **(gridty)pe [file ] [ ] [ ... ] ;** | This command displays a scrollable spreadsheet, or grid, in a new window. Each column holds a variable, and each row shows a separate date. Column and row headings are also included. The grid display is convenient for scrolling around to look at the data. One also can copy data from the grid display to the Windows clipboard. If the optional "file " part of the command is given, the results are written to an output file, exactly as with *matty*. The dates are optional. If none are given, then default values are determined by the current *tdates*. After each series name there is an optional "decimal places" number ( ... ). Each series can be specified to have a different number of decimal places. If not specified, the default value of 3 is employed, unless the *decs* or *format* command has been given to specify a different default. If a value for is given for one series, it will be in effect for all of the other series in the list. Example:: # GRIDTY.TST - Test the operation of the "gridty" command. hbk quip gridty gnp c v; Related Topics: :ref:`matty `, :ref:`show ` .. _G7RMgroup: | **(gro)up ** | Define the content of the dynamic group. A group definition works as follows. Any list of numbers separated by blanks or commas may be included. Two numbers joined by a dash ('-') indicate a consecutive range of numbers to be included. A group definition within a group definition, enclosed by parenthesis indicates a group of sectors to be excluded from the overall group. For example:: group 1-10 (4, 7-9) Indicates a group consisting of the numbers (1,2,3,5,6,10). The name of a group created by the *group* command in *G7* is *:*. This name is used in the various commands that may use groups. These commands may also use named groups, if they have been created in a GROUPS.BIN file by the Fixer program. Related Topics: Groups, :ref:`ctrl `, :ref:`glist `, :ref:`index `, :ref:`lint `, :ref:`listgroups ` | **group ** | **** | This version of the *group* command adds a named group to the GROUPS.BIN file. This group then can be used in other commands requiring group expressions by prefixing the group name with a colon ':'. The group definition include a sequence of integers, a range of integers, a set of letters to specify spreadsheet columns, and other named groups. To exclude a set of values from the group definition, simply include the set to be excluded in parentheses. For example:: group Manufacturing # All manufacturing sectors 1-58 f empmfg = @csum(emp, :Manufacturing) group NonchemicalMfg # All manufacturing sectors except chemicals :Manufacturing (20-27) .. _G7RMgsave: | **(gs)ave ** | Save the current graph to a Windows Metafile. Only give the rootname of the file in , the extension .WMF will be automatically appended. The file will be saved to the current directory unless you supply a full path name. Related Topics: Drawing Graphs, :ref:`gname `, :ref:`listgroups ` .. _G7RMgtfile: | **(gtf)ile ** | The *gtfile* command scans the specified stub file and stores the starting position of each line in the stub file. This command is used only in preparation for giving a sequence of *gtitle* commands. The titles from the stub file that just has been scanned now are available to be used as titles, as specified by *gtitle*. To close the *gtfile* command, give "gtfile off". Related Topics: :ref:`gtitle ` .. _G7RMgtitle: | **(gti)tle ** | This command requires that a *gtfile* command has been given with a valid stub file as an argument. The *gtitle* command then will use the n-th line of the stub file to take a title in the following *graph* command. (The title will be the text after the semicolon (';') in the stub file.) These commands, *gtfile* and *gtitle*, particularly are handy in combination with the *do* command or with an add file with group arguments. Since in these cases only sector numbers are being passed, the *gtitle* command allows you to specify a sector number and get back the title for that sector. Related Topics: :ref:`gtfile `