gnuplot中的加/减符号? [英] Plus/minus symbol in gnuplot?
问题描述
我正在gnuplot中生成.eps数字,以使用
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"
然后它正确显示在默认的"wxt"终端上,但在后记输出中以A开头并带有抑扬符(即-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"
有效,但看起来很垃圾.过去,我通过使用'Angstrom'字符(Å)
works but looks rubbish. In the past i've used the 'Angstrom' character (Å) by doing
set encoding iso_8859_1
set xlabel "wavelength (\305)"
,但我也没有设法使它适用于±的unicode表示形式,我认为它是\ 261(请参阅
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"
但我只是在-56和2之间留有空白.有关如何执行此操作的任何想法?如果重要的话,Ubuntu 10.10和Gnuplot 4.4补丁程序级别0.
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.
推荐答案
从Gnuplot的角度来看,正确的答案确实是这样的:
Just for the record, from the Gnuplot perspective the correct answer does appear to be this:
set encoding iso_8859_1
set label "-56 \261 2"
给出标签
-56 ± 2
它可以完美地在另一台机器(相同的Gnuplot级别)上运行,因此我不确定为什么原来的Ubuntu机器上有问题.两台机器都能正确显示生成的.eps文件.
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.
这篇关于gnuplot中的加/减符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!