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