To use a picture in a document, the METAFONT program must be run with the output file from gnuplot as input. Thus, the user needs a basic knowledge of the font creating process and the procedure for including a new font in a document. However, if the METAFONT program is set up properly at the local site, an unexperienced user could perform the operation without much trouble.
The text support is based on a METAFONT character set. Currently the Computer Modern Roman font set is input, but the user is in principal free to choose whatever fonts he or she needs. The METAFONT source files for the chosen font must be available. Each character is stored in a separate picture variable in METAFONT. These variables may be manipulated (rotated, scaled etc.) when characters are needed. The drawback is the interpretation time in the METAFONT program. On some machines (i.e. PC) the limited amount of memory available may also cause problems if too many pictures are stored.
The mf terminal has no options. METAFONT Instructions
- Set your terminal to METAFONT:
set terminal mf
set output "myfigures.mf"
- Quit gnuplot.
- Generate a TFM and GF file by running METAFONT on the output of gnuplot. Since the picture is quite large (5*3 in), you will have to use a version of METAFONT that has a value of at least 150000 for memmax. On Unix systems these are conventionally installed under the name bigmf. For the following assume that the command virmf stands for a big version of METAFONT. For example:
- Invoke METAFONT:
virmf '&plain'
\mode:=CanonCX; % or whatever printer you use
mag:=1; % or whatever you wish
input myfigures.mf
- Generate a PK file from the GF file using gftopk:
gftopk myfigures.300gf myfigures.300pk
- To include your pictures in your document you have to tell TeX the font:
\font\gnufigs=myfigures
\centerline{\gnufigs\char0} \centerline{\gnufigs\char1}
This conversion saves you a lot of time once you have generated the font; TeX handles the pictures as characters and uses minimal time to place them, and the documents you make change more often than the pictures do. It also saves a lot of TeX memory. One last advantage of using the METAFONT driver is that the DVI file really remains device independent, because no special commands are used as in the eepic and tpic drivers.