How do I change the font of xaxis
, yaxis
label
and title
to (arial for example) in xmgrace
batch file?

- 37,241
- 25
- 195
- 267

- 200
- 3
- 20
1 Answers
Solution:
To change the x axis font add the following line to your batch file:
xaxis label font 4
Font number 4 is mapped to Helvetica. The full list of available fonts are described in the documentation at http://plasma-gate.weizmann.ac.il/Xmgr/doc/fonts.html
Arial is not included, since it has a proprietary license. Grace is licensed under the GNU General Public License and therefore doesn't use proprietary fonts. Helvetica is a good sans serif alternative and is often recommended for scientific publications.
Changing the default font mappings:
If you want to change the default font mapping you can do so by creating a new folder (assuming you use GNU/Linux) at
~/.grace/templates/
then creating a new Default.agr file
cp /usr/share/grace/templates/Default.agr ~/.grace/templates/
and modifying the lines relating to font mapping: e.g.
...
@map font 0 to "Helvetica", "Helvetica"
@map font 1 to "Helvetica-Oblique", "Helvetica-Oblique"
@map font 2 to "Helvetica-Bold", "Helvetica-Bold"
@map font 3 to "Helvetica-BoldOblique", "Helvetica-BoldOblique"
@map font 4 to "Times-Roman", "Times-Roman"
@map font 5 to "Times-Italic", "Times-Italic"
...
Now whenever you create a new plot Helvetica should be used by default.

- 3,431
- 2
- 36
- 61