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

Home » Public Forums » archive » Re: math in graph title
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: math in graph title [message #53976] Wed, 09 May 2007 15:40
Christopher Thom is currently offline  Christopher Thom
Messages: 66
Registered: October 2006
Member
Quoth Benjamin Hornberger:

> kostis wrote:
>> How can I write a mathematical expression in a plot title
>> with superscripts and subscripts appearing the right way?
>>
>> Unfortunately: TITLE='x^2' produces x^2
>>
>
> If you know LaTeX, you can use the TeXtoIDL package (search Google for it).

urgh! For some reason, I *always* forget about this, even though I have it
installed...I've been dragging my heels for two days setting up my axis
labels correctly. Thanks for the mental push :)

cheers
chris
Re: math in graph title [message #53978 is a reply to message #53976] Wed, 09 May 2007 11:29 Go to previous message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
kostis wrote:
> How can I write a mathematical expression in a plot title
> with superscripts and subscripts appearing the right way?
>
> Unfortunately: TITLE='x^2' produces x^2
>

If you know LaTeX, you can use the TeXtoIDL package (search Google for
it). Otherwise, you have to use embedded formatting commands. Go to
"fonts" -> "positioning commands" in the IDL help index. For example,

IDL> plot, findgen(10), title='x!e2!x'

produces what you where asking for.

Good luck,
Benjamin
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Binary_template + read_binary
Next Topic: Artifactual Wall with ISURFACE

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

Current Time: Wed Oct 08 15:22:39 PDT 2025

Total time taken to generate the page: 0.00379 seconds