Gnuplot - pdf terminal - setting the Unicode character (mass / oster symbol)

I am trying to set the LaTeX \odot character in the pdf gnuplot terminal (4.6.0). What is the exact syntax for this?

The gnuplot FAQ gives some hints, but should I type {/Symbol \2299} or {/utf8 \2299} or some other options on \ , / , # , etc.? Or should I do set encoding utf8 ? Inserting a character does not directly work.

Should I use pdf or pdfcairo for terminal? The latter affects my stories in unbearable ways.

+7
source share
2 answers

It is pretty simple. First you need to choose a terminal that supports Unicode; then you can really insert your Unicode characters directly. The old pdf terminal does not support Unicode, as you learned, but the later pdfcairo does. You say it ruined your graphs, but how? I found that it gives the same result, but with better quality (smoother lines, anti-aliasing and Unicode!).

Each has a different set of terminals. Other terminals that may support Unicode on your system are pngcairo and svg. The latter is a vector format such as pdf. If you need a pdf file as the final file, and pdfcairo does not work for you, use something else that can handle Unicode and convert the file. The LaTeX solution is ultimately the best if you want great labels and math decorations, but you need to work well in LaTeX to control the output.

+3
source

Here's how to use the epslatex terminal. Run these commands in the gnuplot or gnuplot script:

 set terminal epslatex standalone color set output 'plot.tex' set xlabel '$\odot$ is a \LaTeX symbol.' plot sin(x) 

Then you can run pdflatex in the resulting plot.tex or latex , and then dvipdf . This works great if you don't mind if LaTeX is for the interpreter for all the text in your plot. If you just want to include the \odot character, I'm not sure how to do this.

+4
source

All Articles