How can I show special characters in xmgrace? I can't find a list of special symbols including the multiplication symbol or greek letters or the use of subscripts.
2 Answers
In order to enter the symbol font in xmgrace you can use the \x
escape sequence. This is shorthand for the \f{Symbol}
inline command, which changes to the Symbol font. The font name (or code) is specified inside the curly brackets. An official list of usable fonts can be found here.
In order to use some specific symbols, such as infinity ∞ or multiplication × , there is an extra complication:
Following \x
with \c
enters you into the upper 128 characters of a symbol set, while using \C
enters the lower 128 characters. The upper 128 characters are used by default. When you are typing labels manually in the xmgrace interface you can press Ctrl-e to open the "Font tool" window, which displays all the fonts. You can select symbols with the cursor, however it is not possible to select the lower 128 characters in this way.
To answer your specific examples:
\x\c4
Multiplication symbol × (in the lower 128 characters)
\x
Greek letters e.g. for α Γ use \xaG
. These are in the upper 128 characters.
To return to the regular font (in fact, to leave any special font) use the escape sequence \f{}
.
\S
and \s
Superscripts and subscripts, respectively, e.g. for x^2 use x\S2
.
To return to normal case use the escape sequence \N
. If you have used \c then you will also need to use \C to get back to the lower 128 character set.
I often need to use the ° "degrees" symbol, which is \x\c0
.
For more information see this great overview here.

- 3,431
- 2
- 36
- 61
-
Thanks for the link to the overview..!! – chatur Apr 14 '15 at 20:49
-
Hi! Is there any possibility of putting superscript right above the subscript? if I write something like `\xS\f{}\su\N\S+\N`, the superscript ir too far to the right... – Eenoku Jun 06 '19 at 14:35
-
Yes, you can! There is a command to shift horizontally. Try this: `\xS\f{}\su\N\S\h{-0.6}+\N`. Credit to the great answer from @lr1985 here: https://stackoverflow.com/questions/55150318 – feedMe Jun 07 '19 at 08:10
-
Great hint about the font tool. You can also access it via the Window menu. I found it easy to search the symbol I wanted in the upper character set (note you might need to scroll down to see that set) then find the corresponding character in the lower character set. So as @feedMe mentioned ° is `\c0`. You can figure this out by looking for ° in the upper section of the font menu, say, first column second row. Then go to the same cell in the lower section. You'll see 0 in corresponding spot, i.e. first column second row of lower section. That is how you know to type the 0 in `\c\0` – Andrew Jan 31 '22 at 15:04
if you're in a text entry window then type "control-e" and you'll get a new window. It probably defaults to Helvetica. Select "Symbol". The greek characters are there.
In general \f{fontname} selects the font "fontname" and "Symbol" is the font with greek characters. As a shortcut you can enter the "\x" control followed by the keys which map to the greek characters, then "\f{}" to return to the default plot ("\x" is short for "\f{Symbol}"). For example:
"Length [\xm\f{}m]"
This prints Length followed by the symbol for micrometers in square brackets.
Note there's also a μ character in the latin fonts but it will render slightly differently. However, most greek characters are available only in the Symbol font.
It's a bit frustrating that it doesn't simply handle unicode but grace is around 20 years old now... still really good, however.

- 441
- 2
- 4
-
Thank you.If you know that maybe you could help me one more time.Still working with grace and right now I am trying make exp function using "by formula" and I am clueless.What I should put in Y and Y1? – wiedzminYo Jan 10 '15 at 19:24
-
@wiedzminYo please submit a new question instead of asking in a comment. I will answer for you. – feedMe Feb 15 '15 at 09:34