Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plus/minus symbol in gnuplot?

Tags:

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"

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.

like image 507
strmqm Avatar asked Jul 30 '11 17:07

strmqm


1 Answers

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" 

which gives a label

-56 ± 2

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.

like image 140
strmqm Avatar answered Sep 24 '22 02:09

strmqm