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
|
Rev | Line | |
---|
[2] | 1 | ;+ |
---|
| 2 | ; |
---|
[142] | 3 | ; @file_comments |
---|
[369] | 4 | ; function called by [XYZ]TICKFORMAT (see the help to see how to use it) to |
---|
| 5 | ; label axes in longitude. |
---|
[2] | 6 | ; |
---|
[142] | 7 | ; @categories |
---|
[157] | 8 | ; Graphics |
---|
[142] | 9 | ; |
---|
| 10 | ; @param AXIS |
---|
| 11 | ; It is the axis number: 0 for X axis, 1 for Y axis, 2 for Z axis. |
---|
[2] | 12 | ; |
---|
[142] | 13 | ; @param INDEX |
---|
| 14 | ; It is the tick mark index which starts at 0. |
---|
[369] | 15 | ; |
---|
[142] | 16 | ; @param VALUE |
---|
| 17 | ; It is the default tick mark value (a floating-point number). |
---|
[2] | 18 | ; |
---|
[142] | 19 | ; @returns |
---|
| 20 | ; A string, used automatically to label |
---|
[2] | 21 | ; |
---|
[142] | 22 | ; @history |
---|
[157] | 23 | ; Sebastien Masson (smasson\@lodyc.jussieu.fr) |
---|
[142] | 24 | ; ??? |
---|
| 25 | ; 14/10/1999 format of labels |
---|
[2] | 26 | ; |
---|
[142] | 27 | ; @version |
---|
| 28 | ; $Id$ |
---|
[2] | 29 | ; |
---|
| 30 | ;- |
---|
| 31 | FUNCTION lonaxe, axis, index, value |
---|
| 32 | ;------------------------------------------------------------ |
---|
[142] | 33 | ; We put back value in the segment [0,360[ |
---|
[114] | 34 | ; |
---|
| 35 | compile_opt idl2, strictarrsubs |
---|
| 36 | ; |
---|
[2] | 37 | lon=value mod 360 |
---|
| 38 | if lon lt 0 then lon=lon+360 |
---|
[142] | 39 | ; format of labels: |
---|
[2] | 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 |
---|
[142] | 45 | ; we write the label |
---|
[2] | 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.