Sun symbol appears in plot window but not in pdf output [message #90173] |
Thu, 05 February 2015 11:18  |
jl386
Messages: 3 Registered: January 2015
|
Junior Member |
|
|
Hi all,
I know there are a million topics on the Sun symbol but I can create it but when I save as a pdf it doesn't appear.
My simple code looks like this
p = plot(findgen(100), xtitle='$M_\odot$')
which produces exactly what I'm after, a M with subscript sun symbol. But when I then do
p.save, 'test.pdf'
The sun symbol appears as TM. I've tried other latex commands and they all appear fine in the pdf output. I'm using IDL 8.3 on yosemite if that matters. If anyone has a suggestion I would really appreciate it!
Thanks,
Joe
|
|
|
|
Re: Sun symbol appears in plot window but not in pdf output [message #90177 is a reply to message #90174] |
Thu, 05 February 2015 18:39  |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Thursday, February 5, 2015 at 12:23:02 PM UTC-7, jl...@st-andrews.ac.uk wrote:
> On Thursday, February 5, 2015 at 12:18:33 PM UTC-7, jl...@st-andrews.ac.uk wrote:
>> Hi all,
>>
>> I know there are a million topics on the Sun symbol but I can create it but when I save as a pdf it doesn't appear.
>>
>> My simple code looks like this
>>
>> p = plot(findgen(100), xtitle='$M_\odot$')
>>
>> which produces exactly what I'm after, a M with subscript sun symbol. But when I then do
>>
>> p.save, 'test.pdf'
>>
>> The sun symbol appears as TM. I've tried other latex commands and they all appear fine in the pdf output. I'm using IDL 8.3 on yosemite if that matters. If anyone has a suggestion I would really appreciate it!
>>
>> Thanks,
>>
>> Joe
>
> So the solution appears to be using /bitmap in the save command...no idea why though.
Hi Joe,
I think the issue has to do with the fonts that are installed on your system, or perhaps the fonts that are embedded in the PDF. I just tried this on my Mac, and I see the same behavior. When you use /bitmap, it just "burns" the fonts into the image, so it doesn't need to rely on the PDF having the fonts embedded, or the fonts on your system.
Anyway, glad you found a solution.
Cheers,
Chris
|
|
|