xtickformat value [message #41195] |
Fri, 24 September 2004 04:07 |
grl
Messages: 5 Registered: August 2003
|
Junior Member |
|
|
Hi IDL users,
I am trying to make a plot with multiple x axis labels. I am using the
xtickformat keyword to call a function I have written and then use the
output value from this function as an index into an array. This all
seems to work very well. However, The first level axis produces about
eight labels all where they should be an good values, but the next
levels ( there are three of them) only produce labels every other
step. The value output from the function seems to change between the
first level and the remaining levels. I have set the xtickunits value
to be the same for each level, so it looks like this,
['hours','hours','hours','hours'].
The function is:
FUNCTION fullhours, axis, index, value, level
COMMON arrays, timehrs,Lshell,sc_lat,localtime
CASE level OF
0: BEGIN
firstrow=timehrs(value*5380)
firstrow=STRCOMPRESS(STRING(firstrow,FORMAT='(F5.1)'),/REMOV E_ALL)
RETURN,firstrow
END
1: BEGIN
secondrow=Lshell(value*5380)
secondrow=STRCOMPRESS(STRING(secondrow,FORMAT='(F6.1)'),/REM OVE_ALL)
RETURN, secondrow
END
2: BEGIN
thirdrow=sc_lat(value*5380)
thirdrow=STRCOMPRESS(STRING(thirdrow,FORMAT='(F6.1)'),/REMOV E_ALL)
RETURN, thirdrow
END
3: BEGIN
fourthrow=localtime(value*5380)
fourthrow=STRCOMPRESS(STRING(fourthrow,FORMAT='(F6.1)'),/REM OVE_ALL)
RETURN, fourthrow
END
ENDCASE
END
Has anybody else come across this before, or know how to fix it?
Thanks in advance.
Gethyn
|
|
|