;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ ;+ ; NAME:LATAXE ; ; PURPOSE:fonction appelee par [XYZ]TICKFORMAT (cf l'help pour voir ; comment l'utiliser) pour labeller les axes en latitude. ; ; CATEGORY:graphe ; ; CALLING SEQUENCE:[XYZ]TICKFORMAT='lataxe' ; ; INPUTS:fournis (et imposes) automatiquement par IDL: axis, index, value: ; Axis is the axis number: 0 for X axis, 1 for Y axis, 2 for Z axis. ; Index is the tick mark index which starts at 0. ; Value is the default tick mark value (a floating-point number). ; KEYWORD PARAMETERS: ; ; OUTPUTS:un string, utilise automatiquement pour labeller ; ; COMMON BLOCKS: ; ; SIDE EFFECTS: ; ; RESTRICTIONS: ; ; EXAMPLE: ; ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) ; ??? ; 14/10/1999 format des labels ;- ;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ FUNCTION lataxe, axis, index, value ;------------------------------------------------------------ ; on ramenne value ds le segment [0,180] lat=value mod 360 if lat lt 0 then lat=lat+360 if lat gt 180 then lat=lat-180 ; format des labels: case 1 of lat EQ round(lat):fmt = 'i4' 10.*lat EQ round(10.*lat):fmt = 'f6.1' ELSE:fmt = 'f7.2' endcase ; on ecrit le label if lat le 90 and lat ne 0 then nom=string(lat, format='('+fmt+',''N'')') if lat gt 90 then nom=string(180-lat, format='('+fmt+',''S'')') if lat eq 0 then nom=string(lat, format='('+fmt+')') ; return, nom end