source: trunk/SRC/ToBeReviewed/PLOTS/LABEL/lataxe.pro @ 325

Last change on this file since 325 was 325, checked in by pinsard, 17 years ago

modification of some headers (+some corrections) to prepare usage of the new idldoc

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
1;------------------------------------------------------------
2;------------------------------------------------------------
3;------------------------------------------------------------
4;+
5;
6; @file_comments
7; function called by [XYZ]TICKFORMAT (see the help to see how to use it) to label axes in latitude.
8;
9; @categories
10; Graphics
11;
12; @param AXIS
13; It is the axis number: 0 for X axis, 1 for Y axis, 2 for Z axis.
14;
15; @param INDEX
16; It is the tick mark index which starts at 0.
17;       
18; @param VALUE
19; It is the default tick mark value (a floating-point number).
20;
21; @returns
22; A string, used automatically to label
23;
24; @history
25; Sebastien Masson (smasson\@lodyc.jussieu.fr)
26;                       ???
27;                       14/10/1999 format of labels
28;
29; @version
30; $Id$
31;
32;-
33FUNCTION lataxe, axis, index, value
34;------------------------------------------------------------
35; We put back value in the segment [0,180]
36;
37  compile_opt idl2, strictarrsubs
38;
39   lat=value mod 360
40   if lat lt 0 then lat=lat+360
41   if lat gt 180 then lat=lat-180
42; format of labels:
43   case 1 of
44      lat EQ round(lat):fmt = 'i4'
45      10.*lat EQ round(10.*lat):fmt = 'f6.1'
46      ELSE:fmt = 'f7.2'
47   endcase
48; we write the label
49   if lat le 90 and lat ne 0 then nom=string(lat,     format='('+fmt+',''N'')')
50   if lat gt 90              then nom=string(180-lat, format='('+fmt+',''S'')')
51   if lat eq  0              then nom=string(lat,     format='('+fmt+')')
52;
53   return, nom
54end
55
Note: See TracBrowser for help on using the repository browser.