;+ ; ; @file_comments ; function called by [XYZ]TICKFORMAT (see the help to see how to use it) to ; label axes in longitude. ; ; @categories ; Graphics ; ; @param AXIS ; It is the axis number: 0 for X axis, 1 for Y axis, 2 for Z axis. ; ; @param INDEX ; It is the tick mark index which starts at 0. ; ; @param VALUE ; It is the default tick mark value (a floating-point number). ; ; @returns ; A string, used automatically to label ; ; @history ; Sebastien Masson (smasson\@lodyc.jussieu.fr) ; ??? ; 14/10/1999 format of labels ; ; @version ; $Id$ ; ;- FUNCTION lonaxe, axis, index, value ;------------------------------------------------------------ ; We put back value in the segment [0,360[ ; compile_opt idl2, strictarrsubs ; lon=value mod 360 if lon lt 0 then lon=lon+360 ; format of labels: case 1 of lon EQ round(lon):fmt = 'i4' 10.*lon EQ round(10.*lon):fmt = 'f6.1' ELSE:fmt = 'f7.2' endcase ; we write the 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