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

Home » Public Forums » archive » 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
Using [XYZ]TICKFORMAT for dynamic formatting [message #66498] Tue, 19 May 2009 08:09 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Hello,

Given the following xtickformat function,

FUNCTION lowticks, axis, index, value
RETURN, STRING( value, FORMAT = '("!C",f7.3)' )
END

I am doing something like the following to get the x-axis tick labels on every other plot
printed on the next line:

!P.MULTI = [0,n_xplots,1]
!X.OMARGIN = [10,3]
!X.MARGIN = [0,0]
!Y.OMARGIN = [2,0]
!Y.MARGIN = [4,2]

FOR i = 0, n_xplots-1 DO BEGIN
IF ( i EQ 1 OR i EQ 3 ) THEN BEGIN
xtickformat = 'lowticks'
ENDIF ELSE BEGIN
xtickformat = ''
ENDELSE

PLOT, x, y, XTICKFORMAT = xtickformat

...etc...

to prevent the end-of-axis tick labels from adjacent plots overwriting each other.

The problem is that I want the format in the "lowticks" function, the "f7.3", to be the
same as those automagically chosen by IDL in the plots where the xtickformat defaults.

Does anyone know if there is any way to dynamically set the format string itself in this
fashion? I.e. pass in the "f7.3" (or f4.1 or f5.2 etc) ?

cheers,

paulv
[Message index]
 
Read Message
Read Message
Previous Topic: Re: area inside tracings
Next Topic: HDF vs HDF-EOS?

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

Current Time: Wed Oct 08 19:01:57 PDT 2025

Total time taken to generate the page: 0.00186 seconds