next up previous contents
Next: 2.4 Drawing bonds Up: 2. Plotting 1D data Previous: 2.2 Making a nicer

   
2.3 Fonts and special characters

The program KUPLOT offers the user various ways to alter the appearance of the text parts of the plot. All these functions are accessed by the command 'font'. If no parameters are given, the current settings will be displayed on the screen, as shown below:


 
Table 2.2: Text control characters
Command Function
$\backslash$u start superscript, or end subscript
$\backslash$d start sub-, or end superscript
$\backslash$b backspace (draw next character on top of current one)
$\backslash$fn switch to normal font (1)
$\backslash$fr switch to roman font (2)
$\backslash$fi switch to italic font (3)
$\backslash$fs switch to script font (4)
$\backslash\backslash$ backslash
$\backslash$x multiplication sign $\times$
$\backslash$. centered dot $\cdot$
$\backslash$A Å

   Font settings for frame no.:   1
      Overall font scaling factor  :   2.50

      Font  where ?              size   fontname            font-id   color
      ---------------------------------------------------------------------
        1   Main title line       16.  Roman                    2       6
        2   Subtitle line         14.  Roman                    2       6
        3   Axis labels           12.  Roman                    2       6
        4   Numbers at axis       12.  Roman                    2       6
        5   Text in text frame    12.  Standard                 1       6
        6   Filename & caption    12.  Roman                    2       6

As can be seen from the output, there are six different types of fonts, the main and second title line, the axis labels, the axis numbering, text in a text frame (see section 4) and finally the font used for annotations and captions. Each of those types is associated with a font size given in points, a font style given as name (e.g. Roman) and number (e.g. 2) and finally a colour in our example pen number 6 or black. The four font styles available in KUPLOT are shown in Figure 2.5. KUPLOT allows the user to apply an overall scale factor to the font size or change font sizes individually. As an example let us change the colour of the first title line to red. This would be done using the command:

    font col,1,1

The first parameter tells KUPLOT what we want to change, here the colour. Next we have the number of the font type, here 1 for the first title line. Finally we specify the desired colour, here pen 1 for red. One benefit of using the PGPLOT library is that the user can access special characters and commands within all text lines, e.g. titles, axis labels and text in text frames. The supported control commands are listed in Table 2.2 and a list of Greek characters is given in Table 2.3. For example to create an axis label Å-2 the text input would read $\backslash$A $\backslash$u-2 $\backslash$d. Note that sub- and superscript always have to be given in pairs.


 
Table 2.3: Access to Greek characters
alpha $\backslash$ga $\alpha$ $\backslash$gA A beta $\backslash$gb $\beta $ $\backslash$gB B
gamma $\backslash$gg $\gamma$ $\backslash$gG $\Gamma$ delta $\backslash$gd $\delta$ $\backslash$gD $\Delta$
epsilon $\backslash$ge $\epsilon$ $\backslash$gE E zeta $\backslash$gz $\zeta $ $\backslash$gZ Z
theta $\backslash$gh $\theta$ $\backslash$gH $\Theta$ iota $\backslash$gi $\iota $ $\backslash$gI I
kappa $\backslash$gk $\kappa$ $\backslash$gK K lambda $\backslash$gl $\lambda$ $\backslash$gL $\Lambda$
mu $\backslash$gm $\mu $ $\backslash$gM M nu $\backslash$gn $\nu $ $\backslash$gN N
xi $\backslash$gc $\xi $ $\backslash$gC $\Xi $ omicron $\backslash$go o $\backslash$gO O
pi $\backslash$gp $\pi $ $\backslash$gP $\Pi $ rho $\backslash$gr $\rho $ $\backslash$gR P
sigma $\backslash$gs $\sigma$ $\backslash$gS $\Sigma$ tau $\backslash$gt $\tau $ $\backslash$gT T
upsilon $\backslash$gu $\upsilon$ $\backslash$gU $\Upsilon$ phi $\backslash$gf $\phi $ $\backslash$gF $\Phi $
chi $\backslash$gx $\chi $ $\backslash$gX X psi $\backslash$gq $\psi $ $\backslash$gQ $\Psi $
omega $\backslash$gw $\omega$ $\backslash$gO $\Omega$          

These examples can only give a brief introduction in the different commands of KUPLOT allowing the user to alter the appearance of the plot. For details on these commands and their parameters refer to the online help, the command reference or the interactive tutorial.


  
Figure 2.5: KUPLOT fonts
\includegraphics[scale=0.5, angle=270.0]{pl1.5.eps}


next up previous contents
Next: 2.4 Drawing bonds Up: 2. Plotting 1D data Previous: 2.2 Making a nicer
Thomas Proffen {Billinge}
1999-06-26