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

Home » Public Forums » archive » Re: Greek and other Symbols in Coyote Graphics
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Greek and other Symbols in Coyote Graphics [message #81088 is a reply to message #80966] Wed, 08 August 2012 03:46 Go to previous message
ameigs is currently offline  ameigs
Messages: 12
Registered: March 2009
Junior Member
On Saturday, July 28, 2012 12:12:38 AM UTC+1, David Fanning wrote:
> David Fanning writes:
>
>
>
>> This morning it occurred to me that I can use the same
>
>> "escape sequences" used by Function Graphics to specify
>
>> symbols in my Coyote Graphics routines. These escape
>
>> sequences prepend a "$\" to the symbol you want to
>
>> call with cgSymbol, and append a closing "$".
>
>>
>
>> So, here is the clunky way a cgPlot command would have to be
>
>> constructed currently to display properly in a cgWindow
>
>> and in an output file with a mu and angstrom symbol:
>
>>
>
>> cgPlot, cgDemoData(1), /Window, $
>
>> XTitle='Length (' + cgSymbol('mu') + M)', $
>
>> YTitle='Distance (' + cgSymbol('Angstrom') + ')', $
>
>> ALT_KEYWORDS={xtitle:'Length (' + cgSymbol('mu', /PS) + M)', $
>
>> ytitle:'Distance ('+ cgSymbol('Angstrom', /PS)+')'}
>
>>
>
>> And here is the new way to do this:
>
>>
>
>> cgPlot, cgDemoData(1), /Window, $
>
>> XTitle='Length ($\mu$M)', $
>
>> YTitle='Distance ($\Angstrom$)'
>
>>
>
>> Quite a bit simpler, yes? :-)
>
>
>
> I have now updated all the graphics routines in the Coyote
>
> Library to take advantage of this method of specifying
>
> Greek characters and other symbols.
>
>
>
> Update your SVN code repository, or download the latest
>
> version of the library from the code repository page:
>
>
>
> http://idl-coyote.googlecode.com/
>
>
>
> Or, from here:
>
>
>
> http://www.idlcoyote.com/programs/zip_files/coyoteprograms.z ip
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Excellent David. Now how about subscripts and superscripts? Or is that already taken care of?

Andy
[Message index]
 
Read Message
Read Message
Previous Topic: Re: How to choose the best rendering system ?
Next Topic: Substituting multiple strings into a program

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

Current Time: Wed Dec 03 06:53:10 PST 2025

Total time taken to generate the page: 0.32653 seconds