Re: Subscripts with greek symbols [message #84029] |
Tue, 23 April 2013 02:12 |
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 #84038 is a reply to message #84031] |
Sun, 21 April 2013 08:24  |
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  |
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  |
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.")
|
|
|