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

Home » Public Forums » archive » Sun Symbol
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 [message #41403] Mon, 25 October 2004 08:14 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

I'm asked about every 10 minutes around here how to
get a good looking sun symbol on IDL plots. A sun
symbol is a circle with a dot in the center of it.
Usually you subscript a capital M with it, and it
represents the mass of the sun, a standard astronomical
unit.

I've read the back issues of the IDL newsgroup (which are
bound in leather on my shelves), and I've seen Wayne Landsman's
sunsymbol.pro in the Astro Library (how in the world
does anyone do any astronomy without Wayne's Library!?),
but I thought I would ask if there is any news I may
have overlooked.

Or, how is the world does LaTeX do it? They seem
to get it right, but we can't seem to work it out as
nicely.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
Re: sun symbol [message #80551 is a reply to message #41403] Mon, 25 June 2012 10:34 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 6/25/12 11:16 AM, wlandsman wrote:
> On Monday, June 25, 2012 12:43:57 PM UTC-4, Mike Galloy wrote:
>
>>
>> I thought more astronomer's would chime in, but the routine I know about
>> is SUNSYMBOL
>>
>> http://idlastro.gsfc.nasa.gov/ftp/pro/plot/sunsymbol.pro
>>
>> available from the IDL Astronomy User's Library
>
> This program uses a kluge in which the center dot is actually slightly off-center. I think the OP was asking about publication quality plots using psfrag. I was actually waiting for you to chime in with
>
> http://michaelgalloy.com/wp-content/uploads/2011/01/vis_psfr ag.pro
>
> although this is not yet a drop-in solution.

Well, if SUNSYMBOL is a kludge, I would not want to know the word used
about VIS_PSFRAG. SUNSYMBOL is definitely more user-friendly, though it
might not produce perfect publication quality output.

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
Re: sun symbol [message #80552 is a reply to message #41403] Mon, 25 June 2012 10:16 Go to previous messageGo to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Monday, June 25, 2012 12:43:57 PM UTC-4, Mike Galloy wrote:

>
> I thought more astronomer's would chime in, but the routine I know about
> is SUNSYMBOL
>
> http://idlastro.gsfc.nasa.gov/ftp/pro/plot/sunsymbol.pro
>
> available from the IDL Astronomy User's Library

This program uses a kluge in which the center dot is actually slightly off-center. I think the OP was asking about publication quality plots using psfrag. I was actually waiting for you to chime in with

http://michaelgalloy.com/wp-content/uploads/2011/01/vis_psfr ag.pro

although this is not yet a drop-in solution.

--Wayne
Re: sun symbol [message #80554 is a reply to message #41403] Mon, 25 June 2012 09:43 Go to previous messageGo to next message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 6/22/12 11:53 PM, bing999 wrote:
> OK, thanks Mike. I am still on v7.1 though...

I thought more astronomer's would chime in, but the routine I know about
is SUNSYMBOL

http://idlastro.gsfc.nasa.gov/ftp/pro/plot/sunsymbol.pro

available from the IDL Astronomy User's Library
(idlastro.gsfc.nasa.gov). You might want to just get there entire library.

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
Re: sun symbol [message #80586 is a reply to message #41403] Fri, 22 June 2012 22:53 Go to previous messageGo to next message
Thibault Garel is currently offline  Thibault Garel
Messages: 55
Registered: October 2009
Member
OK, thanks Mike. I am still on v7.1 though...


> On 6/21/12 11:05 PM, bing999 wrote:
>
>> I was wondering if the "sun symbol" issue could have been solved by
>> anyone.
>> It's been a while that I try to make it work using hardware font for
>> postscript device (e.g. D. Fanning's ps_start, font=0). The solutions
>> for this kind of font available on google (e.g. ps_frag.pro, changing
>> the unicode in /itt/resources/fonts/, etc) are notvery satisfactory
>> because not quite user-friendly...
>
>> So, if a good solution has been found, please let me know! ;)
>
> Possibly not helping you, but just noting that the sun symbol, planet
> symbols, and various other symbols were added in IDL 8.2.
>
> I know there are routines people have used, but I'll let people more
> familiar with them tell you about their favorite.
>
> Mike
> --
> Michael Galloywww.michaelgalloy.com
> Modern IDL, A Guide to Learning IDL:http://modernidl.idldev.com
> Research Mathematician
> Tech-X Corporation
Re: sun symbol [message #80629 is a reply to message #41403] Wed, 27 June 2012 18:15 Go to previous message
manodeep@gmail.com is currently offline  manodeep@gmail.com
Messages: 33
Registered: June 2006
Member
On Jun 26, 3:38 am, Fab <fabien.mauss...@gmail.com> wrote:
> Maybe cgSymbol?
>
> http://www.idlcoyote.com/programs/cgsymbol.pro

Here is what I do with reasonably good results (i.e., not an off-
center dot). I adapted Michael Galloy's vis_psfrag for this. The basic
steps are:

1. Generate your plot in PS with the /TIMES switch and !P.FONT=0
2. Run ms_psfrag with this syntax:

ms_psfrag,input_ps_filename,latex_template_filename,output_p s_filename, "actual
text in the ps","replacement latex text"

You will have to download ms_psfrag.pro (here:
http://astro.phy.vanderbilt.edu/~sinham/code/ms_psfrag.pro). Also, you
have to create a Latex template file -- the contents for the latex
template are in the comments on the top of ms_psfrag.pro.

I still haven't figured out how to sent the font size correctly so you
will have to play around with this line in the latex template:

\psfrag{tag_text}[c][c][1.5]{replacement_text} ,

where 1.5 represents the font size scaling. You will have to change
that 1.5 value such that the replacement font size is similar to other
font sizes in the plot.

For the solar mass symbol, the latex replacement text would be '$M_
\odot$'. A code snippet could be:

-----------------------
set_plot,'ps'
!p.font=0
fname = 'plot.eps'
templatefname = 'figure.tex' ;;;; you will have to create this latex
template file as figure.tex
device,filename=fname,/color,/portrait,bits_per_pixel=8,/enc apsulated,/
times
xtitle = 'ZM'

plot,findgen(10),xtitle=xtitle

device,/close
outfname = fname
ms_psfrag,fname,templatefname,outfname,xtitle,'Mass [M$_\odot$]'
-----------------------

Hope this helps.

Cheers,
Manodeep
Re: sun symbol [message #80689 is a reply to message #41403] Tue, 26 June 2012 01:38 Go to previous message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
Maybe cgSymbol?

http://www.idlcoyote.com/programs/cgsymbol.pro
Re: sun symbol [message #80690 is a reply to message #80551] Tue, 26 June 2012 00:43 Go to previous message
Thibault Garel is currently offline  Thibault Garel
Messages: 55
Registered: October 2009
Member
Hi,

Actually, sunsymbol.pro has off-center sun symbol as you say, and
vis_psfrag.pro is not very easy to handle (especially because it
replaces the full string by the sun symbol as far as I understand...).

So, no sun symbol solution yet for postscript fonts in IDL7.1...
Thanks though.


> On 6/25/12 11:16 AM, wlandsman wrote:
>
>> On Monday, June 25, 2012 12:43:57 PM UTC-4, Mike Galloy wrote:
>
>>> I thought more astronomer's would chime in, but the routine I know about
>>> is SUNSYMBOL
>
>>>   http://idlastro.gsfc.nasa.gov/ftp/pro/plot/sunsymbol.pro
>
>>> available from the IDL Astronomy User's Library
>
>> This program uses a kluge in which the center dot is actually slightly off-center.  I think the OP was asking about publication quality plots using psfrag.   I was actually waiting for you to chime in with
>
>> http://michaelgalloy.com/wp-content/uploads/2011/01/vis_psfr ag.pro
>
>> although this is not yet a drop-in solution.
>
> Well, if SUNSYMBOL is a kludge, I would not want to know the word used
> about VIS_PSFRAG. SUNSYMBOL is definitely more user-friendly, though it
> might not produce perfect publication quality output.
>
> Mike
> --
> Michael Galloywww.michaelgalloy.com
> Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
> Research Mathematician
> Tech-X Corporation
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: help with imdisp
Next Topic: Re: WHERE routine

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

Current Time: Wed Oct 08 11:35:54 PDT 2025

Total time taken to generate the page: 0.00651 seconds