gnuplot 中的加号/减号?
我正在 gnuplot 中生成 .eps 图形,以便包含到用 LaTeX 排版的论文中,使用
set terminal postscript eps enhanced "Helvetica" 14
这通常工作得很好,但我现在尝试使用包含 ± 符号的标签来组合图形。如果我直接使用它,例如
set label "-56±2"
,它会正确显示在默认的“wxt”终端上,但在后记输出中以带扬抑符的 A 为前缀(即 -56±2)。使用
set label "-56^+/-2"
有效,但看起来很垃圾。在过去,我通过这样做使用了“Angstrom”字符(Å),
set encoding iso_8859_1
set xlabel "wavelength (\305)"
但我还没有设法让它适用于 ± 的 unicode 表示,我认为是 \261 (参见 http://www.fileformat.info/info/unicode/char/00b1/index.htm),即
set label "-56 \261 2"
但我只是在 -56 和 2 之间得到一个空格。任何想法如何做到这一点? Ubuntu 10.10 和 Gnuplot 4.4 补丁级别 0(如果重要的话)。
I'm generating .eps figures in gnuplot for inclusion into papers typeset with LaTeX, using
set terminal postscript eps enhanced "Helvetica" 14
This generally works perfectly, but i'm now trying to put together a figure using a label that includes a ± symbol. If I use it directly, e.g.
set label "-56±2"
then it appears correctly on the default 'wxt' terminal but is prefixed by an A with a circumflex (i.e. -56±2) in the postscript output. Using
set label "-56^+/-2"
works but looks rubbish. In the past i've used the 'Angstrom' character (Å) by doing
set encoding iso_8859_1
set xlabel "wavelength (\305)"
but I haven't managed to get this to work either for the unicode representation of ± which I think is \261 (see http://www.fileformat.info/info/unicode/char/00b1/index.htm), i.e.
set label "-56 \261 2"
but I just get an empty space between the -56 and 2. Any ideas on how to do this? Ubuntu 10.10 and Gnuplot 4.4 patchlevel 0, if it's important.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只是为了记录,从 Gnuplot 的角度来看,正确的答案似乎是这样的:
它给出了一个标签
It Works Perfect on a different machine (same Gnuplot level),所以我不确定为什么原始 Ubuntu 机器上有问题;两台机器都能正确显示生成的 .eps 文件。
Just for the record, from the Gnuplot perspective the correct answer does appear to be this:
which gives a label
It works perfectly on a different machine (same Gnuplot level) so i'm not sure why there's an issue on the original Ubuntu machine; both machines display the resultant .eps file correctly.
为了获得更漂亮的标签,我建议使用 epslatex 终端。它生成 eps 格式的图形部分和 Latex 格式的文本部分。然后你可以编辑你的 tex 文件并插入任何特殊字符乳胶支持。
To get a more beautiful label, I suggest epslatex terminal. It produces graph part in eps format and text part in latex format. Then you can edit your tex file and inset any special characters latex support.