;------------------------------------------------------------ ;------------------------------------------------------------ ;------------------------------------------------------------ ;+ ; NAME:LONAXE ; ; PURPOSE:fonction appelee par [XYZ]TICKFORMAT (cf l'help pour voir ; comment l'utiliser) pour labeller les axes en longitude. ; ; CATEGORY:graphe ; ; CALLING SEQUENCE:[XYZ]TICKFORMAT='lonaxe' ; ; 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 lonaxe, axis, index, value ;------------------------------------------------------------ ; on ramenne value ds le segment [0,360[ lon=value mod 360 if lon lt 0 then lon=lon+360 ; format des labels: case 1 of lon EQ round(lon):fmt = 'i4' 10.*lon EQ round(10.*lon):fmt = 'f6.1' ELSE:fmt = 'f7.2' endcase ; on ecrit le label if lon lt 180 then nom=string(lon, format='('+fmt+',''E'')') if lon gt 180 then nom=string(360-lon, format='('+fmt+',''W'')') if lon eq 180 then nom=string(lon, format='('+fmt+')') ; return, nom end