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

Home » Public Forums » archive » Re: How can we pass Greek symbols and formula to IPLOT?
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: How can we pass Greek symbols and formula to IPLOT? [message #69497] Tue, 19 January 2010 00:58
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Jan 19, 12:49 am, Maarten <maarten.sn...@knmi.nl> wrote:
> On Jan 19, 9:43 am, Dave_Poreh <d.po...@gmail.com> wrote:
>
>> Thank you very much. And a very tiny question: I could not writ
>> formula there (in IPLOt). Like: km^2 and …..
>> Cheers
>
> Use TeXtoIDL. It will work for iPlot as well if you set the direct
> graphics device to PS (very much the same as with David's Greek
> function).
>
> iplot,findgen(10),xtitle=textoidl('\Omega\alpha km^2
> ln_2'),xtickfont_index=4
>
> Note that the super- and sub-scripts only work for the next character,
> and no (unlike TeX), {} won't help.
>
> Maarten

Thank you very much Maarten. Another thing how could we change to
BOLD?
Cheers
Re: How can we pass Greek symbols and formula to IPLOT? [message #69498 is a reply to message #69497] Tue, 19 January 2010 00:49 Go to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
On Jan 19, 9:43 am, Dave_Poreh <d.po...@gmail.com> wrote:

> Thank you very much. And a very tiny question: I could not writ
> formula there (in IPLOt). Like: km^2 and …..
> Cheers

Use TeXtoIDL. It will work for iPlot as well if you set the direct
graphics device to PS (very much the same as with David's Greek
function).

iplot,findgen(10),xtitle=textoidl('\Omega\alpha km^2
ln_2'),xtickfont_index=4

Note that the super- and sub-scripts only work for the next character,
and no (unlike TeX), {} won't help.

Maarten
Re: How can we pass Greek symbols and formula to IPLOT? [message #69499 is a reply to message #69498] Tue, 19 January 2010 00:43 Go to previous message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Jan 18, 8:04 am, pp <pp.pente...@gmail.com> wrote:
> On Jan 18, 9:46 am, Dave_Poreh <d.po...@gmail.com> wrote:
>
>> How can we pass Greek symbols and formula to IPLOT?
>> Any help highly would be appreciated.
>
> The same way as in direct graphics. The iTools use TrueType fonts by
> default, but you can use Hershey fonts as well. For instance:
>
> iplot,findgen(10),xtitle="!10abc!X",ytitle="!Z('00B5'X)!M "+string(165B)
> +"!X"
>
> A more convenient way to write the strings for greek letters is to use
> David's greek() function:
>
> http://groups.google.com/group/comp.lang.idl-pvwave/browse_t hread/thr...
>
> It selects the strings for Hershey or TrueType based on the current
> direct graphics device. So if you are using only iplot with the
> default fonts, you can change the device to ps, to make greek() use
> the strings for TureType:
>
> set_plot,'ps'
> iplot,findgen(10),xtitle=greek('Omega')+greek('alpha')
>
> Or, if you can live with Hershey fonts, you can use TeXtoIDL, as in
>
> iplot,findgen(10),xtitle=textoidl('\Omega\alpha'),xtickfont_ index=4
>
> TeXtoIDL is at
>
> http://physweb.mnstate.edu/mcraig/textoidl/
Thank you very much. And a very tiny question: I could not writ
formula there (in IPLOt). Like: km^2 and …..
Cheers
Re: How can we pass Greek symbols and formula to IPLOT? [message #69508 is a reply to message #69499] Mon, 18 January 2010 08:04 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Jan 18, 9:46 am, Dave_Poreh <d.po...@gmail.com> wrote:
> How can we pass Greek symbols and formula to IPLOT?
> Any help highly would be appreciated.

The same way as in direct graphics. The iTools use TrueType fonts by
default, but you can use Hershey fonts as well. For instance:

iplot,findgen(10),xtitle="!10abc!X",ytitle="!Z('00B5'X)!M "+string(165B)
+"!X"

A more convenient way to write the strings for greek letters is to use
David's greek() function:

http://groups.google.com/group/comp.lang.idl-pvwave/browse_t hread/thread/0e48fc1f867a4816#

It selects the strings for Hershey or TrueType based on the current
direct graphics device. So if you are using only iplot with the
default fonts, you can change the device to ps, to make greek() use
the strings for TureType:

set_plot,'ps'
iplot,findgen(10),xtitle=greek('Omega')+greek('alpha')

Or, if you can live with Hershey fonts, you can use TeXtoIDL, as in

iplot,findgen(10),xtitle=textoidl('\Omega\alpha'),xtickfont_ index=4

TeXtoIDL is at

http://physweb.mnstate.edu/mcraig/textoidl/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: ENVI geographic link programmatically
Next Topic: paypal payment wholesale brand shoes,clothing,watch,handbag,jean,ugg boot,t-shirt,jersey,eyeglass,belt,wallet and so on

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

Current Time: Wed Oct 08 11:39:58 PDT 2025

Total time taken to generate the page: 0.00714 seconds