Tables and axes > Using axes as columns > Underlining column headings
 
Underlining column headings
Quick reference
To underline text defined on g statements, type:
un
after the last g statement in a block. n is 1 to underline the whole text, 2 to underline everything apart from blank strings, or 3 to underline non-blanks only.
More information
Text on g statements can be underlined by placing a u statement immediately after the last g statement in a block. The format of the u statement is:
un
where n is 1, 2 or 3 and defines the type of underlining required:
u1 underlines the whole line up to and including the last non-blank character.
u2 underlines the whole line (as u1) except that strings of blanks are not underlined.
u3 underlines non-blank characters only.
These correspond to unl1, unl2 and unl3 on n, col, val, fld and bit statements.
Here is are the spec and table from the previous section updated to include underlining:
l ax04
col 109;Base;Single;Married;Divorced;Widowed
g                     Marital Status
u2
gBase      Single     Married    Divorced     Widowed
u1
p   x   |       x   |       x   |       x   |       x
This produces:
                              Marital Status
         Base      Single     Married    Divorced     Widowed
Base      200  |       44  |      122 |        33  |        1
Male       44  |        6  |       27 |        10  |        1
Female    156  |       38  |       95 |        23  |        0
If u does not meet your needs, you can enter your own underlining on a g statement with hyphens in the appropriate places. This is often useful in complex breakdowns using categories from more than one axis.
For example:
l demog
n10Base
col 112;Under 30;30-50;Over 50
col 111;Male;Female
g                 Age                           Sex
g Base  Under 30   30-50  Over 50           Male    Female
g ----  --------   -----  -------           ----    ------
If you want to convert the tables to a comma-delimited ASCII file using the program q2cda, you might want each column in the column heading to be treated as a separate text (the default is to treat each line as a single text). If so, you must underline the column texts, and each set of underlining must extend the full width of the column. Do not, however, use u for this type of underlining. Use = or – characters on a g statement instead since it is these characters, rather than the underlining character, that q2cda uses for finding the start and end of each column.
See also
Using axes as columns