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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: power style labels [message #14006] Mon, 11 January 1999 00:00
Atsushi SHIMIZU is currently offline  Atsushi SHIMIZU
Messages: 4
Registered: January 1999
Junior Member
steinhh@ulrik.uio.no (Stein Vidar Hagfors Haugan) writes:
> However, I think what he meant was he didn't like the look of
> using ytickformat='(e7.1)', not that he wouldn't use ytickformat
> at all.... how about a draw?

I apologize my fuzzy question. I just dislike the look of (e7.1), and
using ytickformat with function seems very good idea. I appreciate
Vidar's function and Fanning's comments.

Please share the expenses of dinner in Oslo!

Shimizu
Re: power style labels [message #14007 is a reply to message #14006] Sun, 10 January 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Stein Vidar Hagfors Haugan (steinhh@ulrik.uio.no) writes:

> Dave,
>
> I just cancelled a previous post where I had written:
>
>> Dave,
>>
>> Shimizu said he didn't want to use the [xyz]tickNAME keyword,
>> he didn't say anything about the [xyz]tickFORMAT keyword.
> [...]
>> Sure, dinner sounds good, since you decided to take up the
>> bet :-)
>
> Now that I've re-read the original question, I see that Shimizu
> did mention ytickformat:
>
>> ...I don't like to use following style.
>>> plot, [0, 1e4], ytickformat = '(e7.1)'
>
> However, I think what he meant was he didn't like the look of
> using ytickformat='(e7.1)', not that he wouldn't use ytickformat
> at all.... how about a draw?

This whole discusssion reminds me of my favorite
pet peeve about technical support engineers. So many
of them (like I did) answer the *question* rather than
(like Stein Vidar did) solve the *problem*. And I suspect
many of them do it for the same reason I did: there are
not enough hours in the day to do everything that
needs doing. Answering questions is quite a bit easier
than solving problems. :-)

But the number one rule of technical support, it seems
to me, is that the question is almost always indicative
of confusion, not clear thinking. If most bright people
think clearly about a problem, they can usually solve
it on their own. Thus, just answering the question is
often not all that helpful. The best support engineers,
like Stein Vidar, anticipate the problem behind the question
and work to solve that. Often the problem is nothing more
than fuzzy (or incomplete) thinking on the part of the user.

In any case, I'll be happy to spring for dinner the next
time I'm in Oslo because no matter which question you answer--
the one asked or the one anticipated--I almost always
learn something worth knowing. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Progamming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: power style labels [message #14008 is a reply to message #14007] Sun, 10 January 1999 00:00 Go to previous message
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
Dave,

I just cancelled a previous post where I had written:

> Dave,
>
> Shimizu said he didn't want to use the [xyz]tickNAME keyword,
> he didn't say anything about the [xyz]tickFORMAT keyword.
[...]
> Sure, dinner sounds good, since you decided to take up the
> bet :-)

Now that I've re-read the original question, I see that Shimizu
did mention ytickformat:

> ...I don't like to use following style.
>> plot, [0, 1e4], ytickformat = '(e7.1)'

However, I think what he meant was he didn't like the look of
using ytickformat='(e7.1)', not that he wouldn't use ytickformat
at all.... how about a draw?

Regards,

Stein Vidar
Re: power style labels [message #14010 is a reply to message #14007] Sat, 09 January 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Stein Vidar Hagfors Haugan (steinhh@ulrik.uio.no) writes:
>
> 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:

Using the WHAT keyword!?

Sure, it is easily possible with a function. But the
man said he didn't what to use the keyword. What can
I say? I stand by my statement and I accept the bet.
Dinner next time I'm in Oslo? :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Progamming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: power style labels [message #14013 is a reply to message #14010] Sat, 09 January 1999 00:00 Go 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
Re: power style labels [message #14022 is a reply to message #14010] Fri, 08 January 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
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. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Progamming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: UTF
Next Topic: Problem with IDL output files

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

Current Time: Wed Oct 08 15:17:44 PDT 2025

Total time taken to generate the page: 0.00637 seconds