June 22nd, 2010 | 6 Comments

If you use the postscript terminal and have a greek letter e.g. Φ for the xlabel, it should be italic because it is a variable.

To get the greek letter you have to use the enhanced mode of the terminal and can write

set xlabel '{/Symbol P}'

But this produces a non italic Φ and it is not obvious how to get it italic. For normal letters the following will work

set xlabel '{/Helvetica-Italic P}'

and produces a *P*. But for the Symbol font `Italic`

is not the right notation, instead you have to use `Oblique`

:

set xlabel '{/Symbol-Oblique P}'

This will finally generate our desired italic *Φ*.

**Update:** in the meantime I have learned Helvetica-Italic is not part of the official postscript core fonts. Hence, use also Helvetica-Oblique.

Do you know how to do this (insert symbols) in the x11 terminal?

The enhanced mode works also with the x11 terminal, but you need a font that is able to display the symbol you want.

For example try the following:

set terminal x11 enhanced font ‘arial,15’

set xrange [-2.5*pi:2.5*pi]

set xtics (‘-2{/Symbol P}’ -2*pi, ‘-{/Symbol P}’ -pi,’0′ 0, ‘{/Symbol P}’ pi, ‘2{/Symbol P}’ 2*pi)

plot sin(x)

thanks for useful hints.

happy gnuplotting

Hi,

Thank you for this !

Do you know if there is any way to make the part about the italic work with pdfcairo terminal?

ie is there anyway to make this work with fontconfig?

In my case I have tried

set terminal pdfcairo font “Utopia Italic” which works (but of course everything is in italic)

and unfortunately

set terminal pdfaciro font “Utopia”

set ylabel “{/Symbol D}{/Utopia-Italic F}” does not.

Any pointer would be greatly appreciated

Thanks a lot

G.

Hi,

it’s a shame but I think it is not possible with the cairo terminals at the moment, but you may have a look at this patch

Brilliant, this Gnuplot! I am using it for all my timing diagrams.