comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Sun symbol (again!)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Sun symbol (again!) [message #64410] Sun, 21 December 2008 15:32 Go to next message
Michael Williams is currently offline  Michael Williams
Messages: 17
Registered: December 2008
Junior Member
Has anyone made any progress with getting a circular, typographically
correct sun symbol using IDL? This is the last post on the issue, and
I agree with its authors that the solutions from 2004 and 1997 are not
satisfactory.

On 11 Apr, 04:49, "jsch...@gmail.com" <jsch...@gmail.com> wrote:
> I'd like to make a plot with a nice sun symbol.
>
> It's been a few years since we had this discussion, and I was hoping
> perhaps someone has some new insight.
>
> I've read the newsgroup discussions from '04 and '97 and wasn't
> particularly thrilled with any of the solutions.
>
> Here are the things that won't / don't work for me.
>
> 1) TeXtoIDL doesn't know \odot.
>
> 2) sunsymbol.pro gives something unsatisfactory
>
> http://web.mit.edu/jschwab/Public/sunsym.png
>
> 3) The solution that initially seemed most inline with what I want was
> modifying my ttfont.map and using the marvosym font. I don't find this
> satisfactory because it's not a permanent solution since I don't want
> to modify my ttfont.map each time and because I don't even approve of
> the way it looks. (It's not symmetric!)
>
> http://web.mit.edu/jschwab/Public/marvosym.png
>
> What I'm left with is manually positioning the vector font symbol '!9!
> Z(6E)!X'. It will work and gives me something that's not bad looking.
> Unsurprisingly though, I find it rather unsatisfying.
>
> If anyone has a better / more flexible solution, I'd love to hear it.
Re: Sun symbol (again!) [message #64424 is a reply to message #64410] Mon, 29 December 2008 13:51 Go to previous messageGo to next message
jschwab@gmail.com is currently offline  jschwab@gmail.com
Messages: 30
Registered: December 2006
Member
>> What I'm left with is manually positioning the vector font symbol '!9!
>> Z(6E)!X'. It will work and gives me something that's not bad looking.
>> Unsurprisingly though, I find it rather unsatisfying.
>
>> If anyone has a better / more flexible solution, I'd love to hear it.

I never found a more satisfactory solution than the following snippet.

plot, [0, 0], [0, 0], /nodata, $
xrange = [8, 16], xtitle = "Radius [km]",$
ytitle = "Mass [M ]", yrange = [0, 3.5], $
position = [0.10, 0.15, 0.53, 0.95], $
xtickname = ['8', '10', '12', '14', ' ']


xyouts, 6.80, 1.96, /data, "!9!Z(6E)!X", font = -1, charthick = 3, $
charsize = 1.5

which gave me something that looked like this.

http://web.mit.edu/jschwab/Public/final_sunsym.png

Fortunately, I only had a few different plots to make.

Josiah
Re: Sun symbol (again!) [message #64438 is a reply to message #64410] Sun, 28 December 2008 13:53 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Michael Williams writes:

> I think I embedded this question in the middle of a longer post. I'd
> just like to bump it. In Postscript output, is there a way to mix
> Hershey and Postscript fonts in the same string? Failing that, can you
> mix them in the same figure?

It is not possible to mix PostScript output and Hershey output
in the same string. You can, of course, write PostScript output
in one string, and Hershey output in another string, and put
both into the same PostScript file. So one could, in theory,
put a Hershey sun symbol inside a plot title, for example, if
you constructed it correctly. In practice, it is so onerous
do get the spacing and location correct, that I don't think
anyone has bothered to try it.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Sun symbol (again!) [message #64440 is a reply to message #64410] Sun, 28 December 2008 09:19 Go to previous messageGo to next message
Michael Williams is currently offline  Michael Williams
Messages: 17
Registered: December 2008
Junior Member
On 24 Dec, 00:41, Michael Williams <mjwilli...@gmail.com> wrote:
> I don't mind Hershey fonts for this one character! Is there any way to
> mix them up with real Postscript fonts in the same output? This would
> be ideal!

I think I embedded this question in the middle of a longer post. I'd
just like to bump it. In Postscript output, is there a way to mix
Hershey and Postscript fonts in the same string? Failing that, can you
mix them in the same figure?
Re: Sun symbol (again!) [message #64457 is a reply to message #64410] Tue, 23 December 2008 19:15 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Michael Williams writes:

> For the benefit of future Googlers, the sun symbol in marvosym, while
> better than many other solutions, is not a circle but a backwards
> "o" (note the thickness and angle of the stroke on the right and left-
> hand sides). An astronomical sun symbol is a perfect circle with a
> point at its centre: http://en.wikipedia.org/wiki/Sun_symbol. Users of
> OS X have access to (and licenses for!) a number of TrueType fonts
> which contain this symbol and presumably following your procedure to
> get a True Type symbol with these fonts would also work. These fonts
> include Apple Symbols and Arial Unicode MS. Presumably the same is
> true on Windows and Linux.

Indeed, I found the Arial Unicode MS font already installed on
my computer. I've updated the article with this additional
information. Thanks for the update.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Sun symbol (again!) [message #64458 is a reply to message #64410] Tue, 23 December 2008 18:53 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Michael Williams writes:

> At the risk of wandering off-topic, as someone new to IDL, its
> typographic capabilities seem to me to be extremely eccentric, crufty
> and archaic compared to other graphing toolkits.

I'm afraid typography doesn't fall into the category of
geegaw that is fashionable in IDL updates at the moment.
Maybe in a couple of years when the widgets that write
themselves are finished. ;-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Sun symbol (again!) [message #64475 is a reply to message #64424] Mon, 05 January 2009 06:47 Go to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
HI everybody,

I just wanted to mention that there is a way to
put LaTeX labels instead on postscript plots
generated in IDL.

This however requires to use an external program
after the plot is run in IDL. While it does require
quite a bit of effort, it may be useful if you want
to embed equations or esoteric symbols (such
as the Sun symbol) in your plots.

This was discussed in this group a while ago
and some smart googling should find the thread...

Ciao,
Paolo


jschwab@gmail.com wrote:
>>> What I'm left with is manually positioning the vector font symbol '!9!
>>> Z(6E)!X'. It will work and gives me something that's not bad looking.
>>> Unsurprisingly though, I find it rather unsatisfying.
>>
>>> If anyone has a better / more flexible solution, I'd love to hear it.
>
> I never found a more satisfactory solution than the following snippet.
>
> plot, [0, 0], [0, 0], /nodata, $
> xrange = [8, 16], xtitle = "Radius [km]",$
> ytitle = "Mass [M ]", yrange = [0, 3.5], $
> position = [0.10, 0.15, 0.53, 0.95], $
> xtickname = ['8', '10', '12', '14', ' ']
>
>
> xyouts, 6.80, 1.96, /data, "!9!Z(6E)!X", font = -1, charthick = 3, $
> charsize = 1.5
>
> which gave me something that looked like this.
>
> http://web.mit.edu/jschwab/Public/final_sunsym.png
>
> Fortunately, I only had a few different plots to make.
>
> Josiah
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: workbench new programs
Next Topic: Re: problems on idl java import bridge

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:38:39 PDT 2025

Total time taken to generate the page: 0.00649 seconds