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

Home » Public Forums » archive » Re: Subscripts with greek symbols
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
Re: Subscripts with greek symbols [message #84029] Tue, 23 April 2013 02:12
Harish Khandrika is currently offline  Harish Khandrika
Messages: 3
Registered: April 2013
Junior Member
Thank you so much, Dr. Fanning, for taking the time from your busy schedule to edit the CheckForSymbols program. It even fixed my issues with an errant postscript output of my plots with the greek subscripts!

On Sunday, April 21, 2013 8:24:52 AM UTC-7, David Fanning wrote:

> I have added the ability to use Greek characters as subscripts or
>
> superscripts to the Coyote Library. In this example, you would formulate
>
> the text like this, using the "\\" symbol to indicate the Greek letter
>
> to be used:
>
>
>
> cgPlot, cgDemoData(1), XTitle='$\Omega$$\sub\\lambda$', Charsize=2.0
>
>
>
> To create a superscript, you could do this:
>
>
>
> cgPlot, cgDemoData(1), XTitle='$\Omega$$\up\\lambda$', Charsize=2.0
>
>
>
> You will need to update your cgCheckForSymbols program:
>
>
>
> http://www.idlcoyote.com/programs/cgcheckforsymbols.pro
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Subscripts with greek symbols [message #84031 is a reply to message #84029] Mon, 22 April 2013 14:19 Go to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
Or you could do it this way with new graphics:

p = plot(findgen(10), findgen(10), xtitle='$\Omega_\Lambda$')

-Chris
ExelisVIS
Re: Subscripts with greek symbols [message #84038 is a reply to message #84031] Sun, 21 April 2013 08:24 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Harish Khandrika writes:

> I am trying to create a plot with axis titles that have greek
letters and greek subscripts, however I'm having a hard time trying to
get it to do what I would like it to do. In tex-speak, I want it to
display something to the effect of "\Omega_\Lambda". Presently if I do
something like
>
> cgplot, findgen(10), findgen(10), xtitle='$\Omega$$\sub\Lambda$', this literally writes the word '\Lambda' in subscript terms.
>
> What is the correct procedure for producing "\Omega_\Lambda" or any other greek letter for a subscript/superscript?
>
> Any help would be greatly appreciated.

I have added the ability to use Greek characters as subscripts or
superscripts to the Coyote Library. In this example, you would formulate
the text like this, using the "\\" symbol to indicate the Greek letter
to be used:

cgPlot, cgDemoData(1), XTitle='$\Omega$$\sub\\lambda$', Charsize=2.0

To create a superscript, you could do this:

cgPlot, cgDemoData(1), XTitle='$\Omega$$\up\\lambda$', Charsize=2.0

You will need to update your cgCheckForSymbols program:

http://www.idlcoyote.com/programs/cgcheckforsymbols.pro

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Subscripts with greek symbols [message #84039 is a reply to message #84038] Sat, 20 April 2013 17:10 Go to previous message
Harish Khandrika is currently offline  Harish Khandrika
Messages: 3
Registered: April 2013
Junior Member
Hi Dr. Fanning,

Thank you for your prompt reply and help with my problem! It works for now and I can use it for my assignment.

I greatly appreciate it, and I hope you have a wonderful evening and a great rest of your weekend!

Best,
Harish

On Saturday, April 20, 2013 5:05:25 PM UTC-7, David Fanning wrote:
> Harish Khandrika writes:
>
>
>
>> I am trying to create a plot with axis titles that have greek letters and greek subscripts, however I'm having a hard time trying to get it to do what I would like it to do. In tex-speak, I want it to display something to the effect of "\Omega_\Lambda". Presently if I do something like
>
>>
>
>> cgplot, findgen(10), findgen(10), xtitle='$\Omega$$\sub\Lambda$', this literally writes the word '\Lambda' in subscript terms.
>
>>
>
>> What is the correct procedure for producing "\Omega_\Lambda" or any other greek letter for a subscript/superscript?
>
>>
>
>> Any help would be greatly appreciated.
>
>
>
> Well, this is complicated. :-(
>
>
>
> I'm going out for the evening, but this should get you going, I guess:
>
>
>
> IDL> print, cgSymbol('lambda')
>
> !4k!X
>
> IDL> cgplot, findgen(10), findgen(10), xtitle='$\Omega$$\sub!4k!X$'
>
>
>
> The problem is a substitution inside a substitution. The software is not
>
> set up currently to handle something like this. I'll see what I can do
>
> about it later.
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Subscripts with greek symbols [message #84040 is a reply to message #84039] Sat, 20 April 2013 17:05 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Harish Khandrika writes:

> I am trying to create a plot with axis titles that have greek letters and greek subscripts, however I'm having a hard time trying to get it to do what I would like it to do. In tex-speak, I want it to display something to the effect of "\Omega_\Lambda". Presently if I do something like
>
> cgplot, findgen(10), findgen(10), xtitle='$\Omega$$\sub\Lambda$', this literally writes the word '\Lambda' in subscript terms.
>
> What is the correct procedure for producing "\Omega_\Lambda" or any other greek letter for a subscript/superscript?
>
> Any help would be greatly appreciated.

Well, this is complicated. :-(

I'm going out for the evening, but this should get you going, I guess:

IDL> print, cgSymbol('lambda')
!4k!X
IDL> cgplot, findgen(10), findgen(10), xtitle='$\Omega$$\sub!4k!X$'

The problem is a substitution inside a substitution. The software is not
set up currently to handle something like this. I'll see what I can do
about it later.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: I need to bulid a digital phantom urgently, Thanks for help!
Next Topic: Re: IDL issues: poly_fit.pro.

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

Current Time: Wed Oct 08 13:48:40 PDT 2025

Total time taken to generate the page: 0.00689 seconds