source: trunk/ToBeReviewed/PLOTS/LABEL/lataxe.pro @ 39

Last change on this file since 39 was 39, checked in by pinsard, 18 years ago

upgrade of PLOTS/LABEL according to cerbere.lodyc.jussieu.fr: /usr/home/smasson/SAXO_RD/ : files

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1;------------------------------------------------------------
2;------------------------------------------------------------
3;------------------------------------------------------------
4;+
5; NAME:LATAXE
6;
7; PURPOSE:fonction appelee par [XYZ]TICKFORMAT (cf l'help pour voir
8;         comment l'utiliser) pour labeller les axes en latitude.
9;
10; CATEGORY:graphe
11;
12; CALLING SEQUENCE:[XYZ]TICKFORMAT='lataxe'
13;
14; INPUTS:fournis (et imposes) automatiquement par IDL: axis, index, value:
15;       Axis is the axis number: 0 for X axis, 1 for Y axis, 2 for Z axis.
16;       Index is the tick mark index which starts at 0.
17;       Value is the default tick mark value (a floating-point number).
18; KEYWORD PARAMETERS:
19;
20; OUTPUTS:un string, utilise automatiquement pour labeller
21;
22; COMMON BLOCKS:
23;
24; SIDE EFFECTS:
25;
26; RESTRICTIONS:
27;
28; EXAMPLE:
29;
30; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr)
31;                       ???
32;                       14/10/1999 format des labels
33;-
34;------------------------------------------------------------
35;------------------------------------------------------------
36;------------------------------------------------------------
37FUNCTION lataxe, axis, index, value
38;------------------------------------------------------------
39; on ramenne value ds le segment [0,180]
40   lat=value mod 360
41   if lat lt 0 then lat=lat+360
42   if lat gt 180 then lat=lat-180
43; format des labels:
44   case 1 of
45      lat EQ round(lat):fmt = 'i4'
46      10.*lat EQ round(10.*lat):fmt = 'f6.1'
47      ELSE:fmt = 'f7.2'
48   endcase
49; on ecrit le label
50   if lat le 90 and lat ne 0 then nom=string(lat,     format='('+fmt+',''N'')')
51   if lat gt 90              then nom=string(180-lat, format='('+fmt+',''S'')')
52   if lat eq  0              then nom=string(lat,     format='('+fmt+')')
53;
54   return, nom
55end
56
Note: See TracBrowser for help on using the repository browser.