I need to insert greek letter Beta into YLabel of my plot. I am using ubuntu
version 18.04
and gnuplot
version 5.2
.
Based on the suggestions provided in How do I include greek letter in gnuplot?, I tried the following commands.
set encoding iso_8859_1
set terminal jpeg large font 'arial,20' size 800,750
set termoption enhanced
set xlabel "{/=24 {/Arial:Bold S195/CB-H57/CB distance} ({\305})}"
set ylabel "{/=24 {/Arial:Bold D102/CB-H57/C{/Symbol b} distance} ({\305})}" enhanced
But I am not getting Beta symbol in the output file. Instead blank empty rectangle is displayed.
The generic answer to any question "How do I use character <whatever> in gnuplot?" is set encoding utf8
. See the FAQ.
In particular:
Do not use PostScript constructs like {/Symbol b}
or {\305}
if you are not creating PostScript output. The special Adobe Symbol font is a PostScript-only work around from the 1980s.
You have explicitly set the encoding to iso-8859-1, which does not include any Greek letters. Do not do that.
Your ylabel command should look like this:
set encoding utf8
... other commands ...
set ylabel "{/Arial:Bold=24 D102/CB-H57/Cβ distance (⊕)}"