问题
Feel frustrated when I cannot add a simple "π" symbol on x axis. I searched lots of solution and there is what I use:
set terminal postscript eps enhanced
set output "test.eps"
set xrange [-2*pi:2*pi]
set sample 600
set xtics pi
set mxtics 2
set xtics ("-2{/Symbol P}" -2*pi, "-{/Symbol P}" -pi, "0" 0, "{/Symbol P}" pi, "2{/Symbol P}" 2*pi)
There is no "π" on the x axis! Am I wrong with any codes? or I missed any possible packages? Please see the xlabel below:
Update: I tried lots of methods including set terminal enhanced, but still doesn't work. And I just find that my mac Preview (pdf viewer) doesnt show character correctly (pic below). I believe that's the reason and I m still working on it.
enter image description here
回答1:
I experience the same problem and found a workaround. If I open the resulting eps file from gnuplot in Inkscape and save it as eps file again, the pi character renders as it should. I just use the basic import, not the Poppler, but it's worthy experimenting with both. If I then open the new eps file with Preview, the pi characters are there.
来源:https://stackoverflow.com/questions/40824152/how-to-show-%cf%80-symbol-on-x-axis