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

Home » Public Forums » archive » Re: power style labels
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: power style labels [message #14013 is a reply to message #14010] Sat, 09 January 1999 00:00 Go to previous messageGo to previous message
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
David Fanning wrote:

> Atsushi SHIMIZU (shimizu@kurasc.kyoto-u.ac.jp) writes:
>
>> Could anyone tell me how to force IDL to make labels with power style
>> without using [XYZ]TICKNAME?
>
> No, I doubt it. :-)

Oh - wanna bet? :-)

Using the xtickformat to name a formatting function, this
can definitely be done. Try the following:

FUNCTION ytf,axis,index,n
IF n EQ 0 THEN return,'0' ;; Special case

ex = string(n,'(e7.0)')
pt = strpos(ex,'.')

first = strmid(ex,pt-1,1)
sgn = strmid(ex,pt+2,1)
exp = strmid(ex,pt+3,100)

;; Shave off leading zero in exponent
IF strmid(exp,0,1) EQ '0' THEN exp = strmid(exp,1,100)

IF sgn EQ '-' THEN return,first+'x10!A'+sgn+exp $
ELSE return,first+'x10!A'+exp
END

and then do

plot, [0, 1e5], ytickformat = 'ytf'

It appears that the "native" IDL tickmarks use a special
symbol for "times" - not simply an "x".... but that's
just about the only difference I can see!

Regards,

Stein Vidar
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: UTF
Next Topic: Problem with IDL output files

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

Current Time: Sat Oct 11 12:57:58 PDT 2025

Total time taken to generate the page: 0.48013 seconds