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

Home » Public Forums » archive » Re: Using [XYZ]TICKFORMAT for dynamic formatting
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: Using [XYZ]TICKFORMAT for dynamic formatting [message #66614 is a reply to message #66552] Fri, 22 May 2009 11:42 Go to previous messageGo to previous message
David Gell is currently offline  David Gell
Messages: 29
Registered: January 2009
Junior Member
On May 21, 4:40 pm, Paul van Delst <paul.vande...@noaa.gov> wrote:
> David Gell wrote:
>> I usually do something like the following when I have to pass data to
>> a callback routine.
>> Change the lowticks routine as follows:
>
>>    FUNCTION lowticks, axis, index, value, format=format
>>      common qqlowticks, sFormat
>>      if n_elements(sFormat) eq 0 then sFormat='("!C",f7.3)'  ;;
>> initialize state memory
>>      if keyword_set(format) ne 0 then begin
>>           sFormat=format
>>           return, 0
>>      endif
>
>>      RETURN, STRING( value, FORMAT = sFormat
>>    END
>
>> Then, prior to using lowticks as the value of the xtickformat keyword
>> argument, you set the
>> format string,
>
>>     nDummy=lowticks(format='(F7.3)'
>
>>     plot, ..., xtickformat=lowticks
>
>> Hope this helps.
>
> Thanks David. I try to not use common blocks where possible, but I will file it away in
> case I can't get the other suggestions to work.
>
> cheers,
>
> paulv

I also avoid common blocks for communications between routines, but I
often use them to hold state information between invocations of a
routine. Think of it as half-ass*d object programming.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Transporting code from one mac to another: Problem connection to X windows server...
Next Topic: New Business Venture

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

Current Time: Fri Oct 10 01:42:37 PDT 2025

Total time taken to generate the page: 1.83700 seconds