I am trying to use solar mass symbol in gnuplot. I have downloaded and
kept the font file "cmsy10.pfb" in my working directory. Then I am
using the following script
==============================
set term post eps enhanced color "Helvetica" 20 fontfile "cmsy10.pfb"
set o "trial.eps"
set xlabel "X-axis" font "TimesRoman,18"
set ylabel "Mass (M_{/CMSY10 \014})"
plot sin(x)
exit
==========
But in the output file, I can not see the solar mass symbol, my y-axis
label is only Mass (M ).
I am using gnuplot Version 4.4 patchlevel 0 in ubuntu 9.10 linux
Can anyone help to solve this problem ?
Best Wishes
Manjari
I can't reproduce the problem.
If I cut-n-paste your script above into gnuplot 4.4.0, the output
eps file does indeed contain a solar mass symbol, and it displays
properly in gv.
So no, sorry, I don't know where the problem arises on your system.
Hi,
1/ I can reproduce the problem using both own built gnuplot-4.5
and Slackware distribution build of gnuplot-4.2.5.
Just see Mass(M ) as the label.
2/ I'm mystified as to why the character code is Octal 014.
When I look at cmsy10.pfb using fontforge, I see the circledot symbol
as Unicode U+2299
3/ From http://www.gnuplot.info/faq/faq.html Section 6.9 & 6.10
6.9 What if I need h-bar (Planck's constant)?
The most straightforward way is to use a UTF-8 font....
This does not work in PostScript, however, so you must use
approximations...
6.10 What if I need the Solar mass symbol?
As with Planck's constant, the most straightforward way is to use a UTF-8
font...
BUT 6.9 SAYS THAT UTF-8 FONT DOES NOT WORK IN POSTSCRIPT !
4/ This approximation works, but isn't perfect:
set ylabel "Mass (M_{{/=12 O}&{/*-.50 O}{/=12 \267}} )"
(I don't understand exactly what the term &{/*-.50 O} does).
Inspired by this:
http://objectmix.com/graphics/139420-solar-mass-symbol.html
Cheers,
Peter
It seems the font file is causing the problem. You need cmbsy10.pfb
Then this line works OK for me:
set ylabel "Mass (M_{/CMBSY10 \014})"
You get the font in the package from here:
http://www.ams.org/publications/authors/tex/amsfonts
ftp://ftp.ams.org/pub/tex/amsfonts.zip
AMSFonts documentation is here:
ftp://ftp.ams.org/pub/tex/doc/amsfonts/amsfndoc.pdf
Dig around in the zip file to find cmbsy10.pfb
It's in:
./amsfonts/fonts/type1/public/amsfonts/cm/cmbsy10.pfb
Cheers,
Peter
Not surprising, as they're the only ones with the circledot character
defined at octal 014 (decimal 12).
These contain circledot @ octal 014:
fontforge Font Information gives:
"Version 003.002. Copyright (c) 1997, 2009 American Mathematical Society
(<http://www.ams.org>), with Reserved Font Name CMSY10".
and "...with Reserved Font Name CMBSY10".
ftp://ftp.ams.org/pub/tex/amsfonts.zip
32569 2009-07-14 15:37 cmsy10.pfb
md5: 5e5ddc8df908dea60932f3c484a54c0d
34793 2009-07-14 15:37 cmbsy10.pfb
md5: 87a84b12f86dfd35a1cf1bb142b75602
These don't contain circledot @ octal 014:
fontforge Font Information gives:
"Version 1.1/12-Nov94. Copyright (C) 1994, Basil K. Malyshev.
All Rights Reserved. BaKoMa Fonts Collection, Level-B."
http://mirror.ctan.org/fonts/cm/ps-type1/bakoma/patched-pfb/cmsy10.pfb
26274 1996-11-27 01:42 cmsy10.pfb
md5: f2be5521a69d9a32856a4cf77a21afea
http://mirror.ctan.org/fonts/cm/ps-type1/bakoma/patched-pfb/cmbsy10.pfb
26965 1996-11-27 01:43 cmbsy10.pfb
md5: 012753f5a3a474ae90df995281be2b9c
http://mirror.ctan.org/fonts/cm/ps-type1/bakoma/pfb/cmsy10.pfb
26274 1995-01-23 11:12 cmsy10.pfb
md5: d870e2a1350bc005e472d371c33bb05b
http://mirror.ctan.org/fonts/cm/ps-type1/bakoma/pfb/cmbsy10.pfb
26965 1995-01-23 11:12 cmbsy10.pfb
md5: 3163aa7433f15d285b102ee6382b1395
Cheers,
Peter