Using Software Fonts
To use software fonts, you must set the value of the !P.Font system variable to –1. This is the default setting. For example:
WAVE> !P.Font = -1
This section explains how to format software text and select different software fonts.
You can embed formatting and font commands in the string arguments of plotting keywords such as Title, Subtitle, XTitle, and YTitle and in the string parameter of the XYOUTS procedure.
Software Font Formatting Commands
You can accomplish a wide variety of text formatting effects, such as subscripting, superscripting, and equation formatting, by embedding formatting commands in text strings. For example, the Title keyword definition:
Title = 'E = mc!U2'
produces the following title when plotted:
E = mc2
This example uses the !U formatting command, which shifts the 2 up into a superscript. More examples of text formatting appear later in this chapter.
The following list describes all of the available formatting commands.
!A—Shift above the division line.
!B—Shift below the division line.
!C—Create a multiple-line annotation. For example:
plot, x, y, title= 'First Line!CSecond Line'
(See the Note following this section.)
!D—Shift down to the first level subscript and decrease the character size by a factor of 0.62.
!E—Shift up to the exponent level and decrease the character size by a factor of 0.44.
!I—Shift down to the index level and decrease the character size by a factor of 0.44.
!L—Shift down to the second level subscript. Decrease the character size by a factor of 0.62.
!N—Shift back to the normal level and original character size.
!R—Restore position. The current position is set from the top of the saved positions stack.
!S—Save position. The current position is saved on the top of the saved positions stack.
!U—Shift to upper subscript level. Decrease the character size by a factor of 0.62.
!!—Print the ! symbol.
note | If you break a line of text using !C, you may have to increase the !X and/or !Y margin fields to allow room for the extra line(s) of text. |
Changing Software Fonts
You can change software fonts by embedding a font selection command directly in a text string. The default font is called Simplex Roman, and its font command !3. The following statement changes the font from the default to Complex Roman (!6):
Title = '!6E = mc!U2'
This produces the following title when plotted:
You can change the font anyplace in a string by embedding a font command where you want the font change to occur. However, note that the selected font remains in effect until explicitly changed with another embedded font command.
Plot titles, subtitles, and axis titles are drawn in a particular order. You need to keep this order in mind when you mix the fonts used to annotate plots, because subsequently drawn items “inherit” their font from previously drawn items. The order is:
1. Main title
2. Subtitle
3. X axis numbers
4. X axis title
5. Y axis numbers
6. Y axis title
7. Z axis numbers
8. Z axis title
note | To achieve some kinds of font combinations in a single plot, you may need to use the OPLOT procedure to overplot some of the text. |
There are 17 different software fonts to choose from. They are illustrated in Chapter 23: Software Character Sets in the PV‑WAVE Reference.
More examples showing font selection appear later in this chapter.
Table 10-1: Font Selection Commands lists the font selection commands.