|
Graphics / Graph Labels: Fonts and Line Breaks |
The GRPARM instruction and the Graph Settings Wizard (which generates a GRPARM instruction) allow you to choose the font, type size, and style (normal, bold, or italics) used for graph labels (e.g. headers, axis labels, key labels, etc.). You can also use File—Preferences to change the default values for these.
The GRTEXT instruction also allows you to set these attributes for the text string being added to the graph. This page describes how RATS handles fonts for graph labels.
Choosing Fonts
The FONT option on GRPARM and GRTEXT allows you to choose the font for the specified label or text. With WinRATS, you can choose from any font installed on your system. RATS will use the font when displaying or printing the graph. You specify a font by typing its name in quotes. For example:
GRPARM(FONT="Times New Roman") HLABEL *
This tells RATS to use the Times New Roman font for the HLABEL in any subsequent graphs (you can use an asterisk for the label size parameter if you don't want to change the size from its current value).
You can use the Fonts option on the Windows Control Panel to see a list of the fonts available on your system. In general, you need to supply the exact name of the font, although case (upper vs. lower) does not matter.
Fonts and Saving Graphs
When you save a graph in RGF format, RATS preserves all of the GRPARM settings, including font selections. If you re-open an RGF graph in RATS, it should look the same as when you saved it (although the proportions may change based on the graph window shape—see Graph Proportions).
RATS will also preserve font information when you save a graph as a PostScript or PDF file. However, PostScript font names are often different from Windows font names. In such cases, you should use the PostScript version of the font name when you generate the graph, rather than the Windows version. For example, you might specify FONT="Helvetica" rather than FONT="Arial". Also, multi-word font names are generally separated by a blank space under Windows, but must be separated by a hyphen in PostScript. For example, you would use FONT="Times-Roman" if you are exporting the graph to PostScript, but FONT="Times New Roman" if you are printing the graph from Windows.
Note: if you are printing to a PostScript printer from RATS, use the Windows versions of the font names, not the PostScript names. The operating system will automatically handle translating the fonts.
Type Sizes
Type sizes are relative in RATS, because labels are automatically scaled to fit the size of the graph being drawn. Thus to change the size of a label, you should specify the size in relation to the default size, not in terms of an absolute point size. (This is effectively what happens when you resize any graph from any application).
For example, the default size for headers is 24 points. On a 6 inch by 9 inch graph (the size of a typical journal page), headers will be drawn at about 24 points. However, if you use SPGRAPH to put four graphs on a single 8.5 × 11 inch page, RATS will scale the headers to an actual size of about 6 points. To choose a different size, use GRPARM to specify a new value relative to the default of 24. For example, you might try GRPARM HEADER 28 for a slightly larger label.
Line Breaks
You can include line breaks in GRTEXT strings as well as graph headers, subheaders, and horizontal axis labels, by including the characters \\\\ in the string, at the point where you want the line break. This works on the HEADER, SUBHEADER, and HLABEL options on all of the relevant graphing instructions and in a GRTEXT string.
Copyright © 2025 Thomas A. Doan