Gnuplot is a great visualization tool to use. However the default font is not so pleasant for me. Following is the record on my adventure for alternative fonts. The description is mainly Gentoo oriented.
Which font to use?
I'd like to try TTF font for nicer looking, and Bitstream Vera bundled with Gnome just fits my taste. In case that you have not installed Gnome (e.g. you're pretty much satisfied with the plain terminal, or you use X only without any desktop environment, or you are a fan of other desktop environments like KDE or E17), you may install the font with one command in Gentoo: emerge ttf-bitstream-vera.
Gnuplot should be built with libgd support. To do so, you should enable the USE flag "gd". You may add gd to your make.conf, or use the following command to add it for gnuplot alone:
echo "sci-visualization/gnuplot gd" >> /etc/portage/package.use
After that, build gnuplot by typing emerge gnuplot. The version I'm using for this post is 4.2.2.
Configure environment variable
Add the following line to one of the shell profiles (e.g. ~/.bash_profile):
Try it out
Now launch gnuplot. To test whether our settings take effect, type the following at gnuplot prompt:
gnuplot> set term png enhanced font "Vera,12" Terminal type set to 'png' Options are 'nocrop enhanced font Vera 12 ' gnuplot> set output "test.png" gnuplot> plot sin(x) gnuplot> quit
Now start your favorite photo viewer to examine test.png (I use Emacs in this case). Does the figure looks prettier than before? (Note: it seems that the font name is case sensitive and should be consistent with the actual file name of the font: "Vera" works in above example while "vera" not.)
One limitation is that TTF fonts are not available to X11 terminal therefore you cannot directly enjoy the effect within gnuplot. Emacs users using gnuplot-mode might not feel too much switching pain in this case. Another solution is: if you have ImageMagick installed, you can use png terminal, and pipe the output to ImageMagick by typing set output '|display png:-' instead of plain test.png as shown above.