;+ ; ; @file_comments ; function called by [XYZ]TICKFORMAT (see the help to see how to use it) to ; label axes in latitude. ; ; @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 lataxe, axis, index, value ;------------------------------------------------------------ ; We put back value in the segment [0,180] ; compile_opt idl2, strictarrsubs ; lat=value mod 360 if lat lt 0 then lat=lat+360 if lat gt 180 then lat=lat-180 ; format of labels: case 1 of lat EQ round(lat):fmt = 'i4' 10.*lat EQ round(10.*lat):fmt = 'f6.1' ELSE:fmt = 'f7.2' endcase ; we write the 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