Changeset 142 for trunk/SRC/ToBeReviewed/PLOTS/LABEL
- Timestamp:
- 07/21/06 14:47:49 (18 years ago)
- Location:
- trunk/SRC/ToBeReviewed/PLOTS/LABEL
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/PLOTS/LABEL/label.pro
r134 r142 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:label6 5 ; 7 ; PURPOSE:permet de choisir le stype de label que l'on veut utiliser8 ; lors d'un contour6 ; @file_comments 7 ; Allows to choose the type of the label we want to use at the time of a contour. 9 8 ; 10 ; CATEGORY:graphique 9 ; @categories 10 ; graphic 11 11 ; 12 ; CALLING SEQUENCE:pro label,cas,min,max,ncontour,level_z2d 12 ; @param CAS {in}{required} 13 ; Number of the type of the label we want to trace 14 ; 15 ; @param MIN {in}{required} 16 ; Smallest value for the drawing of the contour. 13 17 ; 14 ; INPUTS: 15 ; cas=numero du type de label que l'on veut tracer 16 ; min et max = valeures min et max entre lesquelles on veut faire 17 ; des contours 18 ; @param MAX {in}{required} 19 ; Biggest value for the drawing of the contour. 18 20 ; 19 ; KEYWORD PARAMETERS: 21 ; @keyword INTERVALLE 22 ; Value of an interval betwenn two isolines. By default, it is calculated to 23 ; draw 20 isolines. In all cases, this keyword must be returnedt have a nice 24 ; caption. If levels do not contain regular intervals, put it at -1. 20 25 ; 21 ; INTERVALLE: valeur d'un intervalle entre deux isolignes. par defaut 22 ; est calcule pour tracer 20 isolighnes. Dans tous les cas ce not cle 23 ; doit etre retourne pour pouvoir avoir une belle legende. Si les 24 ; niveaux ne comportent pas d''intevalle regulier, le mettre a -1 26 ; @keyword NLEVEL 27 ; Number of contour to be drawn. By default =20. Active if LABEL=0 or is not specified. 25 28 ; 26 ; NLEVEL: nombre de contours a dessiner. par defaut =20. actif si 27 ; LABEL=0 ou nest pas specifie. 29 ; @param NCONTOUR {out} 30 ; Number of contour to be drawn. 31 ; 32 ; @param LEVEL_Z2D {out} 33 ; Vector containing values of contours we draw. 28 34 ; 29 ; OUTPUTS: 30 ; ncontour=nombre de contour a tracer 31 ; level_z2d=vecteur contenant les valeurs des contours que l'on trace 32 ; colnumb: un vecteur contenant le numero des couleurs qui serviront a 33 ; remplir entre les contours) 35 ; @param COLNUMB {out} 36 ; Vector containing the number of colors which will serve to fill contours. 34 37 ; 35 ; COMMON BLOCKS:36 ; 38 ; @uses 39 ; common.pro 37 40 ; 38 ; SIDE EFFECTS: 41 ; @history 42 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 43 ; 7/5/98 39 44 ; 40 ; RESTRICTIONS: 45 ; @version 46 ; $Id$ 41 47 ; 42 ; EXAMPLE:43 ;44 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr)45 ; 7/5/9846 48 ;- 47 49 ;------------------------------------------------------------ … … 72 74 case cas of 73 75 0: begin 74 ; nlevel label entre le min et le max76 ; nlevel label between the min and the max 75 77 if keyword_set(Nlevel) eq 0 then ncontour=20 else ncontour=nlevel 76 78 ncontour = 1 > ncontour … … 80 82 end 81 83 1: begin 82 ; un certain nombre de label en partant du min jusqu'au plus pres de max avec83 ; un pas fixe par intervalle84 ; a certain number of label from the min to the nearest possible to the 85 ; max with a constant step by interval 84 86 ncontour = fix((max-min)/intervalle) 85 87 ncontour = 1 > ncontour … … 88 90 max=level_z2d[Ncontour-1]+intervalle 89 91 end 90 ; label pour faire les memes sss quedessier92 ; label to do same sss than dessier 91 93 92 94 2: begin … … 100 102 end 101 103 3: begin 102 ; lecture intervalles + palette dans fichierGMT104 ; Readinf of intervals + palette in the file GMT 103 105 104 106 label_gmt, min, max, intervalle, ncoul, ncontour, level_z2d, colnumb -
trunk/SRC/ToBeReviewed/PLOTS/LABEL/label_date.pro
r134 r142 1 ; $Id$2 1 ; 3 2 ; Copyright (c) 1993-1998, Research Systems, Inc. All rights reserved. … … 5 4 6 5 ;+ 7 ; NAME:8 ; LABEL_DATE9 6 ; 10 ; PURPOSE:11 ; 7 ; @file_comments 8 ; This function labels axes with dates and times. 12 9 ; 13 ; CATEGORY:14 ; 10 ; @categories 11 ; Plotting. 15 12 ; 16 ; CALLING SEQUENCE: 17 ; To set up: 18 ; dummy = LABEL_DATE(DATE_FORMAT='string') 19 ; To use: 20 ; PLOT, x, y, XTICKFORMAT='LABEL_DATE' 13 ; @param AXIS {in}{required} 21 14 ; 22 ; INPUTS: 23 ; No explicit user defined inputs. When called from the plotting 24 ; routines, the input parameters are (Axis, Index, Value) 15 ; @param INDEX {in}{required} 25 16 ; 26 ; KEYWORD PARAMETERS: 27 ; DATE_FORMAT: a format string which may contain the following: 28 ; %M for month (3 character abbr) 29 ; %N for month (2 digit abbr) 30 ; %D for day of month, 31 ; %Y for 4 digit year. 32 ; %Z for last two digits of year. 33 ; For time: 34 ; %H for Hours, 2 digits. 35 ; %I for mInutes, 2 digits. 36 ; %S for Seconds, 2 digits. 37 ; %% is %. 38 ; Other characters are passed directly thru. 39 ; For example, '%M %D, %Y' prints DEC 11, 1993 40 ; '%M %2Y' yields DEC 93 41 ; '%D-%M' yields 11-DEC 42 ; '%D/%N/%Y' yields 11/12/1993 43 ; '%M!C%Y' yields DEC on the top line, 1993 on 44 ; the bottom (!C is the new line graphic command). 17 ; @param X {in}{required} 45 18 ; 46 ; MONTHS: The names of the months, a twelve element string array. 47 ; If omitted, use Jan, Feb, ..., Dec. 19 ; @keyword DATE_FORMAT 20 ; a format string which may contain the following: 21 ; %M for month (3 character abbr) 22 ; %N for month (2 digit abbr) 23 ; %D for day of month, 24 ; %Y for 4 digit year. 25 ; %Z for last two digits of year. 26 ; For time: 27 ; %H for Hours, 2 digits. 28 ; %I for mInutes, 2 digits. 29 ; %S for Seconds, 2 digits. 30 ; %% is %. 31 ; Other characters are passed directly thru. 32 ; For example, '%M %D, %Y' prints DEC 11, 1993 33 ; '%M %2Y' yields DEC 93 34 ; '%D-%M' yields 11-DEC 35 ; '%D/%N/%Y' yields 11/12/1993 36 ; '%M!C%Y' yields DEC on the top line, 1993 on 37 ; the bottom (!C is the new line graphic command). 48 38 ; 49 ; OFFSET: An optional starting offset of the plot. 50 ; Unfortunately, single precision floating point is not accurate 51 ; enough to properly represent Julian times. This offset, which 52 ; may be double precision, contains an offset that is added to 53 ; all x values, before conversion to Julian date and time. 54 55 ; OUTPUTS: 56 ; The date string to be plotted. 39 ; @keyword MONTHS 40 ; The names of the months, a twelve element string array. 41 ; If omitted, use Jan, Feb, ..., Dec. 57 42 ; 58 ; COMMON BLOCKS: 59 ; LABEL_DATE_COM. 43 ; @keyword OFFSET 44 ; An optional starting offset of the plot. 45 ; Unfortunately, single precision floating point is not accurate 46 ; enough to properly represent Julian times. This offset, which 47 ; may be double precision, contains an offset that is added to 48 ; all x values, before conversion to Julian date and time. 60 49 ; 61 ; RESTRICTIONS:62 ; Only one date axis may be simultaneously active.50 ; @uses 51 ; LABEL_DATE_COM. 63 52 ; 64 ; PROCEDURE:65 ; Straightforward.53 ; @restrictions 54 ; Only one date axis may be simultaneously active. 66 55 ; 67 ; For an alternative way to label a plot axis with dates, refer to 68 ; the C() format code accepted within format strings (applicable via 69 ; the [XYZ]TICKFORMAT keywords). This new format code was 70 ; introduced in IDL 5.2. 71 ; 72 ; EXAMPLE: 73 ; For example, to plot from Jan 1, 1993, to July 12, 1994: 74 ; Start_date = julday(1, 1, 1993) 75 ; End_date = julday(7, 12, 1994) 76 ; Dummy = LABEL_DATE(DATE_FORMAT='%N/%D') ;Simple mm/dd 77 ; x = findgen(end_date+1 - start_date) + start_date ;Time axis 78 ; PLOT, x, sqrt(x), XTICKFORMAT = 'LABEL_DATE', XSTYLE=1 79 ; (Plot with X axis style set to exact.) 56 ; @examples 57 ; For example, to plot from Jan 1, 1993, to July 12, 1994: 58 ; Start_date = julday(1, 1, 1993) 59 ; End_date = julday(7, 12, 1994) 60 ; Dummy = LABEL_DATE(DATE_FORMAT='%N/%D') ;Simple mm/dd 61 ; x = findgen(end_date+1 - start_date) + start_date ;Time axis 62 ; PLOT, x, sqrt(x), XTICKFORMAT = 'LABEL_DATE', XSTYLE=1 63 ; (Plot with X axis style set to exact.) 80 64 ; 81 65 ; Example with times: … … 92 76 ; PLOT, x, sqrt(x), XTICKFORMAT = 'LABEL_DATE', XSTYLE=1 93 77 ; 94 ; MODIFICATION HISTORY:78 ; @history 95 79 ; DMS, RSI. April, 1993. Written. 96 80 ; DMS, RSI. March, 1997. Added Time format. 81 ; 82 ; Copyright (c) 1993-1998, Research Systems, Inc. All rights reserved. 83 ; Unauthorized reproduction prohibited. 84 ; 85 ; @version 86 ; $Id$ 87 ; 97 88 ;- 98 89 ;----------------------------------------------------------------------------- 99 90 FUNCTION LABEL_DATE, axis, index, x, DATE_FORMAT = format, MONTHS = months, $ 100 91 OFFSET= offs, _EXTRA = ex -
trunk/SRC/ToBeReviewed/PLOTS/LABEL/lataxe.pro
r134 r142 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:LATAXE6 5 ; 7 ; PURPOSE:fonction appelee par [XYZ]TICKFORMAT (cf l'help pour voir8 ; comment l'utiliser) pour labeller les axes en latitude.6 ; @file_comments 7 ; function called by [XYZ]TICKFORMAT (see the help to see how to use it) to label axes in latitude. 9 8 ; 10 ; CATEGORY:graphe 9 ; @categories 10 ; graphic 11 ; 12 ; @param AXIS 13 ; It is the axis number: 0 for X axis, 1 for Y axis, 2 for Z axis. 11 14 ; 12 ; CALLING SEQUENCE:[XYZ]TICKFORMAT='lataxe' 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). 13 20 ; 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: 21 ; @returns 22 ; A string, used automatically to label 19 23 ; 20 ; OUTPUTS:un string, utilise automatiquement pour labeller 24 ; @history 25 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 26 ; ??? 27 ; 14/10/1999 format of labels 21 28 ; 22 ; COMMON BLOCKS: 29 ; @version 30 ; $Id$ 23 31 ; 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 labels33 32 ;- 34 33 ;------------------------------------------------------------ … … 37 36 FUNCTION lataxe, axis, index, value 38 37 ;------------------------------------------------------------ 39 ; on ramenne value ds le segment [0,180]38 ; We put back value in the segment [0,180] 40 39 ; 41 40 compile_opt idl2, strictarrsubs … … 44 43 if lat lt 0 then lat=lat+360 45 44 if lat gt 180 then lat=lat-180 46 ; format deslabels:45 ; format of labels: 47 46 case 1 of 48 47 lat EQ round(lat):fmt = 'i4' … … 50 49 ELSE:fmt = 'f7.2' 51 50 endcase 52 ; on ecrit le label51 ; we write the label 53 52 if lat le 90 and lat ne 0 then nom=string(lat, format='('+fmt+',''N'')') 54 53 if lat gt 90 then nom=string(180-lat, format='('+fmt+',''S'')') -
trunk/SRC/ToBeReviewed/PLOTS/LABEL/lonaxe.pro
r134 r142 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:LONAXE6 5 ; 7 ; PURPOSE:fonction appelee par [XYZ]TICKFORMAT (cf l'help pour voir8 ; comment l'utiliser) pour labeller les axes en longitude.6 ; @file_comments 7 ; function called by [XYZ]TICKFORMAT (see the help to see how to use it) to label axes in longitude. 9 8 ; 10 ; CATEGORY:graphe 9 ; @categories 10 ; graphic 11 ; 12 ; @param AXIS 13 ; It is the axis number: 0 for X axis, 1 for Y axis, 2 for Z axis. 11 14 ; 12 ; CALLING SEQUENCE:[XYZ]TICKFORMAT='lonaxe' 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). 13 20 ; 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: 21 ; @returns 22 ; A string, used automatically to label 19 23 ; 20 ; OUTPUTS:un string, utilise automatiquement pour labeller 24 ; @history 25 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 26 ; ??? 27 ; 14/10/1999 format of labels 21 28 ; 22 ; COMMON BLOCKS: 29 ; @version 30 ; $Id$ 23 31 ; 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 labels33 32 ;- 34 33 ;------------------------------------------------------------ … … 37 36 FUNCTION lonaxe, axis, index, value 38 37 ;------------------------------------------------------------ 39 ; on ramenne value ds le segment [0,360[38 ; We put back value in the segment [0,360[ 40 39 ; 41 40 compile_opt idl2, strictarrsubs … … 43 42 lon=value mod 360 44 43 if lon lt 0 then lon=lon+360 45 ; format deslabels:44 ; format of labels: 46 45 case 1 of 47 46 lon EQ round(lon):fmt = 'i4' … … 49 48 ELSE:fmt = 'f7.2' 50 49 endcase 51 ; on ecrit le label50 ; we write the label 52 51 if lon lt 180 then nom=string(lon, format='('+fmt+',''E'')') 53 52 if lon gt 180 then nom=string(360-lon, format='('+fmt+',''W'')')
Note: See TracChangeset
for help on using the changeset viewer.