How to show π symbol on x axis?

為{幸葍}努か 提交于 2019-12-03 00:27:27

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!