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 #80966] Fri, 27 July 2012 16:12 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
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.")
[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 Oct 08 17:36:52 PDT 2025

Total time taken to generate the page: 0.00406 seconds